Help for this page

Select Code to Download


  1. or download this
    open (FILE, "<file.txt");
    my @file=<FILE>;
    ...
    open (FILE, ">file.txt");
    print FILE "$file[0]\n";
    close FILE;
    
  2. or download this
    tie my @file, 'Tie::File', 'file.txt';
    $file[0]=$file[0] + 1;
    untie @file;