in reply to Scripts work when run individually but not when run as one compiled script
Not sure if this is an actual problem, but it is an inconsistency in your logic:
... my $xlsx = $fp =~ s\csv\xlsx\; ... my $workbook = Excel::Writer::XLSX->new("$fp");
Should this not actually be
... my $xlsx = $fp; $xlsx =~ s/csv/xlsx/; ... my $workbook = Excel::Writer::XLSX->new("$xlsx");
In the s/// they do need to be forward slashes, not backslashes, which have a different meaning.
Updated to reflect better information in discussion following.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Scripts work when run individually but not when run as one compiled script
by shmem (Chancellor) on Jan 19, 2016 at 22:40 UTC | |
by Laurent_R (Canon) on Jan 19, 2016 at 23:09 UTC | |
by Anonymous Monk on Jan 20, 2016 at 00:26 UTC | |
by shmem (Chancellor) on Jan 20, 2016 at 09:04 UTC | |
by Laurent_R (Canon) on Jan 20, 2016 at 13:57 UTC | |
by shmem (Chancellor) on Jan 24, 2016 at 21:00 UTC |