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