blackrose has asked for the wisdom of the Perl Monks concerning the following question:
where $client is the NETBIOS name of the PC on the network. I've tried using $? after the 'close' statement like so - my $exit = $?; but i can't get it to return anything other than zero, regardless of whether 'nmblookup' gets a positive or negative response. (It'll get a negative response if the PC isn't active for example). This tells me i'm not capturing the exit status of the process i want to capture, only that the above code itself has successfully executed. Anyone got any experience of this ?open (NMBLOOKUP, "|nmblookup -r -T $client"); select NMBLOOKUP; close NMBLOOKUP;
Edit by tye: add CODE tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: capturing exit status of a process
by gellyfish (Monsignor) on Aug 06, 2004 at 11:22 UTC | |
|
Re: capturing exit status of a process
by Jaap (Curate) on Aug 06, 2004 at 10:41 UTC | |
by blackrose (Initiate) on Aug 09, 2004 at 14:32 UTC | |
|
Re: capturing exit status of a process
by hmerrill (Friar) on Aug 06, 2004 at 11:11 UTC | |
by blackrose (Initiate) on Aug 09, 2004 at 14:43 UTC |