in reply to Re^5: Need to capture return code
in thread Need to capture return code

I was thinking of something similar:

if ($? ne 0) { print ERRLOG "$FILE"; }

Does $? work with NT in perl?

Replies are listed 'Best First'.
Re^7: Need to capture return code
by dragonchild (Archbishop) on Oct 11, 2004 at 19:54 UTC
    I don't develop on NT, but I would assume so. Test it out with pg's example further down in the thread and see what happens.

    Personally, unless there is some overriding reason why you have to have this be portable across both Unix and NT, I would write it for one system. And, I would write it in the shell scripting language of that system. That's what shell scripting is for.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.