in reply to Re: if ($?variable_name)
in thread if ($?variable_name)

The script which i am looking at has both the perl and tcsh interpreter definded. I am wondering it may be a tcsh syntax then as it does not fit the context . I think it means if the variable variable_name exists get in the if condition ,looking at the context . But not sure .. Thanks

Replies are listed 'Best First'.
Re^3: if ($?variable_name)
by choroba (Cardinal) on Jul 24, 2013 at 22:25 UTC
    Seems you have the answer. The tcsh documentation says:
       $?name
       ${?name}
                   Substitutes the string `1' if name is set, `0' if it is not.
    
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ