## remove comments: $str =~ s/(?:^|\n)[ \t]*#//gs ;