Help for this page

Select Code to Download


  1. or download this
    open I, "<counter.txt"; my $n = <I>; chomp($n); close(I); $n++; open O
    +, ">counter.txt"; print O $n; close(O);
    
  2. or download this
    Storable::nstore("file", \$count);
    
  3. or download this
    perl -MFile::Slurp -le 'write_file "tmp42", $n = 1 + eval{read_file "t
    +mp42"}; print $n'