$rowHandle = \$methodA; if(!methodB($rowHandle)){ return; } sub methodB(){ $handle = $_; &$handle(); } sub methodA(){ if($error){ return 0; } }