in reply to Re^2: file check not working
in thread file check not working
Are you using warnings or run your script using -w?
If so, Perl already tells you what goes wrong:
> perl -wle 'my $f=`date +%Y%m%d.csv`; open my $fh, "<", $f' Unsuccessful open on filename containing newline at -e line 1.
Personally, I would avoid calling a shell just to run date. Use POSIX::strftime instead:
use POSIX 'strftime'; my $extension= strftime( '%Y%m%d.csv', localtime ); ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: file check not working
by jose_m (Acolyte) on Oct 07, 2014 at 17:12 UTC | |
by Anonymous Monk on Oct 07, 2014 at 21:28 UTC | |
by karlgoethebier (Abbot) on Oct 08, 2014 at 09:54 UTC |