I tested it also on my OSX 10.4 machine, seems that anywhere I execute my script I get the proper variable inside $0,
thanks guys! l-p [EMAIL PROTECTED] wrote ---- Hi Steffen, I did think this trough. On my Win32 box, as a packed pp exec, test.exe called as ..\..\test.exe or just test.exe gets C:\fullpath\to\test.exe in $0. So, anything that parses $0 and uses the result correctly when it is a script ( so gets the right path whether $0 contains C:\fullpath\to\test.exe or ..\..\test.exe or .\test.exe or test.exe ), will always work when $0 contains a full path. I can't speak for PerlApp - didn't check that out. Best Regards Mark Steffen Mueller wrote: > Hi Louis-Philippe, > > Louis-Philippe schrieb: >> Thanks Mark! thats it: >> >> script: $0 = >> /Volumes/KanDriv/svn_repos/alpha/trunk/perl/svn_tools/testDir.pl $^X >> = /usr/bin/perl >> >> with pp: $0 = >> /Volumes/KanDriv/svn_repos/alpha/trunk/perl/svn_tools/testDir_pp $^X >> = perl >> >> with PerlApp: $0 = >> /Volumes/KanDriv/svn_repos/alpha/trunk/perl/svn_tools/testDir_perlapp >> $^X = perl >> >> >> so that happen to be the most portable way of doing it, this way I >> don't have to modify my programs to package them with either utility. > > For more detailed information about the various paths involved in a > PAR-packaged binary, you could read the PAR::Environment POD > documentation which comes with PAR-Packer. Of course, if this is already > exactly what you need, that's fine. But please try putting a pp'd binary > into PATH and executing it from a different path. Is $0 ($^X) still the > same? If not, one of the PAR environment vars would help. > > Best regards, > Steffen