On Wednesday 22 Oct 2003 4:41 pm, Jason wrote:
> Hi All,
>
> I need to write a script that cooperates with a bunch of other scripts
> in the 'toolbox' paradigm which is often thought of as a core tenet of
> UNIX philosophy.  In particular, when my script fails, the other
> scripts will look in $? and based on the number therein they will
> perform some actions.  However, I don't know how to write to $? and so
> I may have to rewrite a whole bunch of scripts to read from STDERR.
> Not something I am looking forward to.  How to a send a value to $? in
> Perl?  I have tried the return function but that only works in
> subroutines . . .
>
> Thanks in Advance,
> Jason Dusek

Hi Jason,

you need to supply a value to the exit command - e.g.:

[EMAIL PROTECTED] gary]$ perl -e 'exit 4';
[EMAIL PROTECTED] gary]$ echo $?
4
[EMAIL PROTECTED] gary]$

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to