Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    
    close $rfh or die "Can't close $filename : $!";
    close $wfh or die "Can't close $newfile : $!";
    
  2. or download this
    perl -pi -e 'chomp;s/^(HEADER.*)$/${1}42/;s/^(REMARK.*)$/Extra line\n$
    +1/;$_.="\n"' whateveryourfileiscalled.txt