Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
No. Why would it be? There's no system error. There's merely a usage error. You didn't make a system call that failed ($!) and there's no caught exception ($@). Your program didn't get called with any arguments, which your code detects itself, and there's no more information to provide about the source of the error--you know exactly what the source of the error is! Now I prefer to write that code as: die "No files to process\n" unless @ARGV;... mostly because I prefer the boolean check of the number of elements in @ARGV to checking the number of the last array index. In reply to Re^3: Simplify parsing a file
by chromatic
|
|