in reply to HOP file iterator

Do you perchance mean
sub NEXTVAL { $_[0]->($_[1])
?

"One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
- Henry David Thoreau, Walden