printf "Perl version is v%vd\n\n", $^V; # Codepad's Perl version is old (2002)

use List::Util 'first';

my @list = (11, 22, 33);

my $x = 22;
print "list contains $x\n" if first {$_ eq $x} @list;

my $x = 44;
print "list contains $x\n" if first {$_ eq $x} @list;