#!/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"; }