more useful options | |
PerlMonks |
Re: if fooled by pesky leading white spaceby Fletch (Bishop) |
on Jul 14, 2008 at 03:37 UTC ( [id://697374]=note: print w/replies, xml ) | Need Help?? |
It's not if, it's eq; the string "abc" is not equal to " abc" (computers are quite pedantic that way). If stripping white space is causing problems elsewhere then create a stripped copy and compare that instead.
That'll leave the original untouched for elsewhere.
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|