in reply to Re^7: Convertion Perl Script to Exe with PAR::Packer pp
in thread Convertion Perl Script to Exe with PAR::Packer pp
Aah - that makes it clearer:
my $diretorioScript = dirname(__FILE__); my $excel = Spreadsheet::XLSX->new( "$diretorioScript\\jofalista.x +lsx", );
dirname(__FILE__) is not what you want, because the program will be expanded under C:\TEMP or somewhere.
What you want is documented in PAR::Environment. I guess $ENV{PAR_PROGNAME} is what you want.
my $diretorioScript= $ENV{PAR_PROGNAME} # running under PAR || dirname($0); # running directly
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Convertion Perl Script to Exe with PAR::Packer pp
by marchiore (Initiate) on Jul 25, 2014 at 16:18 UTC | |
by Corion (Patriarch) on Jul 25, 2014 at 17:26 UTC |