in reply to References

It sounds like you're interested in a closure, which is basically a function that has its own set of private data it carries around. (Or the opposite of most OO programing, which is a piece of data that carries around functions.) There's a quite good explanation of this in the Perl documentation -- perldoc -q closure brought it up for me, or you can check out perldoc perlref for lots of reference goodies.

Chris
M-x auto-bs-mode