The purpose of die is to report an error to the calling program, and the exit code is not zero. Using die when everything went right in your Perl program may trigger unexpected behaviour in your calling program. Imagine for instance using your program in a makefile. The make process would end immediately, and you would not know why.
In reply to Re x 2: How to end a Perl script
by Sweeper
in thread How to end a Perl script
by belize
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |