#!/usr/bin/perl my @array = qw( ciccio paperino palla gigio pluto ); my $test = pluto; if ( $test =~ $array[0..$#array] ) { print "It matched!\n"; }