in reply to How to exit out of a sub routine

perldoc -f return

See also perlsub