|
|
| There's more than one way to do things | |
| PerlMonks |
(tye)Re: Cheap idiomsby tye (Cardinal) |
| on Oct 13, 2002 at 17:34 UTC ( #204922=note: print w/ replies, xml ) | Need Help?? |
|
A more robust method is: because your method doesn't localize changes to $ARGV and <ARGV> and so, if used in a subroutine that is used by a program that is using <>, your method can break the outer program. Note that prior to Perl v5.6.0 (I think) this idiom didn't work correctly. And these are exactly the reasons why I much prefer to use a good module over some idiom. That way improvements can be centralized in one place. - tye (see one prior discussion)
In Section
Meditations
|
|
||||||||||||||||||||||||||||||||||||||