Ignite-UX

make_net_recovery returning odd value when run via perl's $?

 
James F. Cox
Occasional Contributor

make_net_recovery returning odd value when run via perl's $?

My apologies in advance if this falls more into the realm of a Perl question than an ignite inquiry.

On my HP-UX 11i v2 system make_net_recovery is run via this Perl snippet:

open(MNR,"/usr/bin/time $mnrCommand 2>&1 > $mnrLog |");

($mnrCommand is a string containing the make_net_recovery commands.)

For some reason the return value as Perl sees (via Perl's $?) it is 512, when it should be 2 (completed with warnings).

I am assuming that 512 is 2 when bit shifted 8, but don't know what would be causing this behavior. When the command is run via the shell ECHO $? results in the expect 2.

Could anyone point me in the right direction for figuring out the cause of this behavior?

Also, could anyone let me know if my logic is sound as to the bit shifting?

Thanks in advance, I know this is a nebulous question.

James.
2 REPLIES 2
James F. Cox
Occasional Contributor

Re: make_net_recovery returning odd value when run via perl's $?

Found the answer myself in this post:

http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1248306348757+28353475&threadId=4895

As an aside I'm absolutely amazed at the wealth of information here. HP should really start using these forums as a selling point.
James F. Cox
Occasional Contributor

Re: make_net_recovery returning odd value when run via perl's $?

The post linked to above answered my question.