perl -p -0 -e 's/(?## #!/usr/bin/perl -w use strict; # set input record separator $/ (see perldoc perlvar) to undef # to "slurp" the file my $t = do {local $/; ()}; # (?## none one two three one none three two none one