| Store | Cart
Lists » pdk

Re: Find out thet perl script runs from binary (compiled) or native code

From: Zsolt Hidasi <zsol...@gmail.com>
Tue, 3 Apr 2012 09:22:51 +0200
Hi Jan,

Bart Terryn suggested me the same solution yesterday (his e-mail probable
wasn't posted to the mailing list) which has solved my problem perfectly.
Now I can use the same script for compiling and for running the script with
the perl interpreter (which is very useful when you don't want to maintain
two scripts for the same purpose).

Thanks to all of you!

With the best: Zsolt

On 3 April 2012 00:20, Jan Dubois <j...@activestate.com> wrote:

> You could use either $PerlApp::VERSION, or defined(&PerlApp::exe) to> determine if you are running as a PerlApp’ed binary, or regular script.***> *>> ** **>> Cheers,****>> -Jan****>> ** **>> *From:* pdk-...@listserv.ActiveState.com [mailto:> pdk-...@listserv.ActiveState.com] *On Behalf Of *Zsolt Hidasi> *Sent:* Monday, April 02, 2012 3:42 AM> *To:* p...@listserv.ActiveState.com> *Subject:* Find out thet perl script runs from binary (compiled) or> native code****>> ** **>> Hi Experts,>> I need help how to find out that perl script is runned from binary> (compiled) or native code. I need it some publishing differences, cause I'd> like to publish the same code in native and compiled version and some> feature of my script depends on the source (if it's compiled or not).>> Is there any way to get it from a special variable like $0 or something> similar?>> The problem is, if you call a compiled (windows version) exe program> without the *.exe extension then the $0 gives only the called name of the> program. I suppose that should be enough if I knew a variable which would> told me its own extension...>> Thx for your replies in advance: Zsolt****>

_______________________________________________
PDK mailing list
P...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Recent Messages in this Thread
Zsolt Hidasi Apr 02, 2012 10:42 am
Bart Terryn Apr 02, 2012 10:58 am
Jan Dubois Apr 02, 2012 10:20 pm
Zsolt Hidasi Apr 03, 2012 07:22 am
$Bill Luebkert Apr 02, 2012 11:00 pm
Messages in this thread