Here's some untested code in Perl:
Or use a precanned CPAN solution.use autodie; use Fcntl qw[:DEFAULT :seek]; sysopen my $fh, "/tmp/text.index", O_RDWR | O_CREATE, 0666; my $count = <$fh> || 0; seek $fh, 0, SEEK_SET; truncate $fh; print $fh $count + 1; close $fh;
In reply to Re: the manuals fail me
by JavaFan
in thread the manuals fail me
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |