Keep It Simple, Stupid | |
PerlMonks |
Re: Testing <> for undefinedby Roy Johnson (Monsignor) |
on Jul 07, 2004 at 16:32 UTC ( [id://372447]=note: print w/replies, xml ) | Need Help?? |
Command line arguments are in the array named @ARGV. The diamond operator gets lines from whatever the current input file is.
If you get a line from a file and test it as in your examples, you will no longer have that line to play with. You want to fetch it into a variable and then do your tests, etc. We're not really tightening our belts, it just feels that way because we're getting fatter.
In Section
Seekers of Perl Wisdom
|
|