Think about Loose Coupling | |
PerlMonks |
Re: Diamond errorsby LanX (Saint) |
on Jan 21, 2023 at 18:42 UTC ( [id://11149750]=note: print w/replies, xml ) | Need Help?? |
> However, after the loop, there doesn't seem to be a way for the program to detect that a file wasn't processed If you want the errors to be kept till after the loop, maybe try a $SIG{"__WARN__"} handler
This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread you can also only record the filename by pushing $ARGV instead and control what the user sees. furthermore you can scope the handler with local tightly around the relevant code { local $SIG{"__WARN__"}= sub {...}; while(<>){...} }
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|