Hello robby_dobby,
You make many good points. I would add:
But I find this comment a bit strange:
I see this convention of if(open($filehandle, "filename") || die $!) - this is really odd style. This means that whatever happens, straight or exceptional flow, go ahead an process this file.
Of course, the if is entirely redundant here. But surely, if the code throws an exception (i.e., die is called), the file will never be processed?
17:11 >perl -Mstrict -wE "say 'Ok 1'; if (open(my $fh, 'nonexistent.tx +t') || die $!) { say 'Ok 2'; } say 'Ok 3';" Ok 1 No such file or directory at -e line 1. 17:11 >
Or have I misunderstood what you’re saying?
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^2: warning: use of uninitialized value
by Athanasius
in thread warning: use of uninitialized value
by mrityunjaynath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |