You can do it with a regex, by anchoring to the beginning and end of string, and quoting any metacharacters, like so:
grep /^\Q$ARGV\E$/, @serv;
Or, how I would do it, with eq:
grep $_ eq $ARGV, @serv;
In reply to Re: grep exact words
by revdiablo
in thread grep exact words
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |