However, after the loop, there doesn't seem to be a way for the program to detect that a file wasn't processed. In real life, that could be awkward.
Simple solution: use strictures.
perl -Mstrictures -e'while(<>){1;}continue{print "$ARGV\n" if eof;}; p +rint $!' file1 file2 file3 file1 Can't open file2: No such file or directory at -e line 1, <> line 1.
That should make it pretty obvious even to the most obtuse of users that something has gone badly wrong.
If you are after a less abrupt, more hand-holding approach then yes, I think it probably best to roll your own.
🦛
In reply to Re: Diamond errors
by hippo
in thread Diamond errors
by tlhackque
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |