in reply to Scripts work when run individually but not when run as one compiled script
Apart from the hint given in Re: Scripts work when run individually but not when run as one compiled script by GotToBTru - three points:
To avoid that, always use File::Spec for path operations.sub csv_xlsx{ my $dir = "C:\\Temp\\Data"; foreach my $fp (glob("$dir/*.csv")) { ... } unlink glob "C:\\Temp\\Data\\*.csv" or warn $! ; }
And a last hint - to format your indenting before posting, you can use Perl::Tidy, which expands tabs and sets the shift width to 4 spaces, given the proper rules for that. ;-)
|
|---|