and checking an open() for success is even safer:
open FILE, '<', $ARGV[0] or die "$ARGV[0]: $!\n";
In cases, that it can't open the file, it won't try to read from an unopened filehandle FILE, but end the script with an error message.
In reply to Re^4: Create new directories
by linuxer
in thread Create new directories
by ibaboom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |