--# 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 $_; }
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: Re: Re: Head comments parsing
by davorg
in thread Head comments parsing
by toadi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |