sub a { my($var) = @_; if(!$evaled) { eval(makesub("somesub")); $evaled=1; } somesub(); # only place I call it from. # only want to eval once per # program execution, but have # access to the my variables for # each calling of "a" }