UPDATE: added file lockuse Tie::File; sub Counter ($) { my @array; my $o = tie @array, 'Tie::File', shift || return undef; $o->flock; $array[0]++; }
jeffa
with thanks to Dominus for Tie::FileIn reply to (jeffa) Re: TIMTOWTDI - a counter
by jeffa
in thread TIMTOWTDI - a counter
by Juerd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |