# Pastebin YkqnFHd9 (py)[timeless@gcc2-power8 spec-glossary]$ cat ../0.pl #!/usr/bin/perl $FH = undef; while (<>) { if (/^=\S+ (.*)/) { close $FH if defined $FH; $f = lc $1; $f =~ s/ /_/; open($FH, '>', $f); } if (defined $FH) { print $FH $_; } } if (defined $FH) { close($FH); $FH = undef; }