http://qs321.pair.com?node_id=617440


in reply to perl's grep function with '^' and '$'

Indeed you are, you should be using qw not qq. See perlop

# Program : 3 #!/usr/bin/perl use strict; my $match = 'A'; my @array = qw[Anthony Mark Alex A]; if ( grep( /^$match$/,@array ) ) { print "Matched\n"; }