$x = '# a comment'; print "$&\n" if $x =~ m/^\#.* # A comment! /x;