if($line =~ /^\|\s$str /){ print "Line is $line (with $str)\n"; }