If you really want a regexp for this though, you can use ^ and $ like this:my $input = shift; if($input eq $scalar) ....
^ matches only at the beginning of the string, and $ only at the end, so this way you force it to match only if it matches the whole string.$string =~ /^user1$/;
In reply to Re: Exclusive pattern matching..
by Dog and Pony
in thread Exclusive pattern matching..
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |