Zembower, Kevin wrote:
When I execute this line:

$type eq "unknown" ? $type="human" : $type="both";

$type is always "both".

PRECEDENCE!  ?: has higher precedence than =

You want to do it like this:

$type = $type eq 'unknown' ? 'human' : 'both';



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to