in reply to ?: (conditional operator)

Actually, you can modify $x, but you need to quantify what you want to be executed contitionaly.. This will work..
perl -e '$x="\nYo "; print $x ? ($x.="hello") : ($x.="Bye");'
Hope this helps
Rich

Replies are listed 'Best First'.
Re: Re: ?: (conditional operator)
by dragonchild (Archbishop) on Aug 23, 2001 at 17:41 UTC
    Hence, the problem seems to be in the expectation of .= and not print.

    ------
    /me wants to be the brightest bulb in the chandelier!

    Vote paco for President!