Giving a non-zero exit code (as die() does) on error makes combining scripts in shell scripts / one-liners a lot easier:
And yes I do this a lot.my-shell$ check-this-config-file.pl && then-stop-this-server && then-d +o-a-lot-of-stuff.pl && then-start-that-server
In reply to Re^2: somewhat OT: Subroutines within if statements
by Joost
in thread Subroutines within if statements
by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |