What is the best way to stop the processing of a subroutine if an error is found without exiting the entire program? For example, I've got a subroutine that reads from a file and processes each line. I know to use the following code if I want to stop processing the program:
open(FILE,"somefile.txt") or die "ERROR\n"; How do I simply stop processing the subroutine, and not the entire program? Can I have multiple statements after the "or"? Thank you very much! Joshua ============================================================================== NOTICE - This communication may contain confidential and privileged information that is for the sole use of the intended recipient. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. ==============================================================================