#! /usr/local/bin/perl # Filter : fortran -> simple # new feature: lines not starting with [ 10+-] are discarded. # Richter 1994/11/10. if ($_ = ) { chop; if (/^[ 10+-](.*)$/) { $nonempty = 1; print "$1"; }; }; while () { chop; if (/^\s*$/) { $nonempty = 1; print "\n"; } elsif (/^ (.*)$/) { $nonempty = 1; print "\n$1"; } elsif (/^1(.*)$/) { $nonempty = 1; print "\n\f$1"; } elsif (/^0(.*)$/) { $nonempty = 1; print "\n\n$1"; } elsif (/^-(.*)$/) { $nonempty = 1; print "\n\n\n$1"; } elsif (/^[+](.*)$/) { $nonempty = 1; print "\r$1"; }; }; if ($nonempty) { print "\n"; };