On Tue, 6 Nov 2001, Tom Servo wrote:

> On Tue, 6 Nov 2001, Luciano Miguel Ferreira Rocha wrote:
>
> > >
> > > I was under the assumption that doing something similar to:
> > >
> > > my $returnval = $msg->send();
> > >
> > > Would give a similar answer.
> > >
> > > I'll give the $? a shot though.   I've noticed that from the shell, it
> > > always has a 0, and that would show up as false under perl...
> >
> > Well, on the shell and every other program, an exit status of 0 means
> > success, and a higher one means an error of some kind.
> >
> > Btw: /bin/false ; echo $? ==> 1
> >      /bin/true  ; echo $? ==> 0
> >
> > Also, the SIGCHLD is sent when a child exits, no matter if in error.
> > You should then check the $? for the reason of the exit and for the
> > return code, if exited normally.
> >
> > Regards,
> >   Luciano Rocha
> >
>
> I've done this now and am getting back a -1 in $?, despite the mail itself
> succeeding.   How can I check the reason for an error code on $? ?

Check the Camel book p134 "Global Special Variables" (2nd ed).

Regards,



Jie

Reply via email to