Needlessly uses a regexp, the regexp isn't anchored, and incorrectly assumes $country contains a regexps. Fix:
print "True","\n" if ( grep $_ eq $country, @countries );
I essentially posted that already.
In reply to Re^3: Using the 'if' statement...
by ikegami
in thread Using the 'if' statement...
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |