Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yes, but that check for "\n" is really irrelevant. It's required to be functionally identically, but not semantically.
Semantics are the real issue here. The regex is saying "Do you have a string that matches the beginning of the string, then t, r, u, e and then the end of the string", and the compare is saying "Is the string the word 'true'?" "Is this the word I want" is the real intent.
xoxo, In reply to Re^2: You don't always have to use regexes
by petdance
|
|