in reply to Re: Re: Head comments parsing
in thread Head comments parsing

# Assume that the header is all the first block of commented # lines and that the first non-comment line ends the # header block while (<OLDFILE>) { last unless is_comment($filetype, $_); } # Print new header to new file print NEWFILE new_header($filetype); # Print the rest of the file while (<OLDFILE>) { print NEWFILE $_; }
--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me