There's more than one way to do things | |
PerlMonks |
Re: Testing <> for undefinedby dws (Chancellor) |
on Jul 07, 2004 at 16:30 UTC ( [id://372443]=note: print w/replies, xml ) | Need Help?? |
Your best bet is to put input into a variable, and test from here. That avoids icky little "but I didn't mean to read twice!" bugs. Also, direct comparisons are going to be problematic unless you remove the trailing newline that comes with the input. E.g.,
But none of that helps when you need to be looking at @ARGV instead.
In Section
Seekers of Perl Wisdom
|
|