Help for this page

Select Code to Download


  1. or download this
    use Fcntl 'SEEK_SET';
    open my $fh, "+<", $file or die;
    ...
    print $fh $_ or die;
    truncate $fh, tell $fh or die;
    close $fh or die;
    
  2. or download this
    perl -pi -le 'BEGIN{$/=",\n"}' file