Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Diamond errors

by hippo (Bishop)
on Jan 21, 2023 at 17:48 UTC ( [id://11149749]=note: print w/replies, xml ) Need Help??


in reply to Diamond errors

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.


🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149749]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found