Problems? Is your data what you think it is? | |
PerlMonks |
Re: pattern match a name from stdinby JediWizard (Deacon) |
on Oct 05, 2005 at 15:44 UTC ( [id://497644]=note: print w/replies, xml ) | Need Help?? |
First: You should probably chomp $file. Secod: if $file contains any metacharacters, they will need to be escaped (see quotemeta). Third: If you are testing for the presence of a literal sting within another sting you may be better off with index (in which case disregard the use of quotemeta) They say that time changes things, but you actually have to change them yourself. Andy Warhol
In Section
Seekers of Perl Wisdom
|
|