in reply to match problem
#!/usr/bin/perl use strict; my $keyword = 'Three-element literal'; my $string = 'The fred array gets a Three-element literal'; if ((index $string, $keyword) != -1) { print "it is match!\n"; } else { print "it is not match!\n"; }
Cheers - L~R
Update: PodMaster pointed out to me I shouldn't be posting when I am overtired - changed ne to !=
|
|---|