my @values = (0, $$, time(), other_initialization_stuff() ); sub counter { ++$values[0]; return @values; }