my $re = ; chomp ($re); my $line = ; chomp ($line); print "$line =~ /$re/\n"; if ( $line =~ /$re/ ) { print "match"; } else { print "no match"; }