On 1/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
snip
> I appreciate the suggestion, but if there is a problem I want the progam to
> email then die. So I would replace
>
> the || do lines in the ftp section
> with a routine call to? :
>
> my $olddie = $SIG{__DIE__};
> $SIG{__DIE__} = sub {
> my $error = shift;
> $olddie->{$error} if ref $olddie;
> mailme($error);
> #other error stuff here
> };
>
snip
No, that defines the override of the default behaviour of the die()
command (see perldoc -f die). The "|| do { blah };" turns into "or
die 'message';" You put all of the "blah" code in the override.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>