in reply to Re: Problems with Contents of $0 when using ActiveState PerlApp
in thread Problems with Contents of $0 when using ActiveState PerlApp
...and I know something like:use File::Spec; use File::Basename; [...] sub GetProcInfo { my ($path, @args); if (defined $PerlApp::VERSION) { $path = PerlApp::exe(); } else { $path = File::Spec->rel2abs($0); } @args = fileparse($path,(".pl", ".exe")); return(@args); }
could possibly be better still, except my regex is kinda bad and I can't work out how to split the type out of the file returned (I want to be able to use just the name and just the extension/type).(@args) = File::Spec->splitpath( $proc_path );
Thanks again for the help.
John
|
|---|