use strict; use warnings; while () { chomp; my $matched = /\## Q:\>perl -w tmp.pl 'shell' matches? no 'hell' matches? no 'this is hell' matches? no 'this is hellish' matches? no 'this is