in reply to match problem

I have no idea what that substr is trying to do, but perhaps you wanted:

#!/usr/bin/perl use strict; my $keyword = 'Three-element literal'; my $string = 'The fred array gets a Three-element literal'; if ($string =~ /$keyword/){ print "it is match!\n"; }else { print "it is not match!\n"; }

We're not surrounded, we're in a target-rich environment!