in reply to bad die behaviour?

Are you really doing script : echo $?? I'm not familiar with the details of unix shell scripting, but maybe $? gets interpolated too soon. Try breaking it down into two commands.

Replies are listed 'Best First'.
Re^2: bad die behaviour?
by Anonymous Monk on Sep 11, 2007 at 10:24 UTC
    All the trouble and confusion was caused by bugs in the Net::SFTP::Foreign module.
    I've upgraded to the latest version and now it works. I don't fully understand why it failed yet, but seems that some die inside the module could be the cause.
    Thank you all
    Xavi