more useful options | |
PerlMonks |
Re^2: Stuck in Perl.. Partial code, but it needs more improvement.. Any suggestions, please?by perlfan (Vicar) |
on Jun 02, 2021 at 23:14 UTC ( [id://11133444]=note: print w/replies, xml ) | Need Help?? |
> ALWAYS CHECK THE RETURN FROM open ...
The typical idiom for this is,
This also mitigates the need for an -e check for read $mode that expect $file exist, particularly useful inside of an eval block or Try::Tiny construct; so that you can handle it. Update, fixed precedence. Point remains the same.
In Section
Seekers of Perl Wisdom
|
|