J.Peng am Freitag, 28. Oktober 2005 11.27:
> hi,
> you can redefined the $SIG{__DIE__} handle to do that.
> such as:
>
> $SIG{__DIE__}=\&yourdie;
> sub yourdie{
>   ...
>   die;
> }

Or, to avoid a second die:

chomsky ~/ramsch $ perl -le '$SIG{__DIE__}=sub {exit(1)}; \
die "explore the reason yourself"'

chomsky ~/ramsch $ echo $?
1

# you will have an exit code of 1 instead of die output.

hth, joe

[...]
> > I just want the current process to die without giving any output to
> > screen, something like this:
[...]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to