sub report { if ($die_on_error) { die $_[0]; } else { warn $_[0]; } } ... report($error) if ($error);
I don't think you want to have to type all that nonsense every time you need to report an error.
Jenda
Enoch was right!
Enjoy the last years of Rome.
In reply to Re: Take reference and then dereference die() and warn()
by Jenda
in thread Take reference and then dereference die() and warn()
by dmitri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |