if ( $foo =~ /^test$/i) { print "It was test!\n"; }