in reply to Support for hash comments on a line

How about a non-regex solution?
($line) = split /#/, $line;

buckaduck