Help for this page

Select Code to Download


  1. or download this
    open(FOO, "+< $myfile") || die "Could not open $myfile $!\n";
    @bar=<FOO>;
    ...
    truncate(FOO, tell);
    print FOO @bar;
    close(FOO);
    
  2. or download this
    open(FOO, "$myfile") || die "Could not open $myfile $!\n";
    @bar=<FOO>;
    ...
    open(FOO, ">$myfile") || die "Could not open $myfile $!\n";
    print FOO @bar;
    close(FOO);