in reply to TIMTOWTDI - a counter

I'd like to see radical changes [...], not some small syntax adjustments

Ah, but "some small syntax adjustments" are all that's between your code working on pre 5.6 install and not.

use Symbol; sub Counter ($) { local $/ = "\n"; my $fh = gensym(); open $fh, "+< $_[0]" or open $fh, "> $_[0]" or return undef; # ... }

But the way I'd do it ...

use File::CounterFile; # ... my $count = File::CounterFile->new($counter,$def_value)->inc;

    --k.