my $c = 0; sub FETCH { my $self = shift; my $index = shift; $c++; print STDERR "Call ($c) fetching the element with index: $index\n"; return $self->[ $index ].$c; }