Better use defined on $opt_Z , cause it will die even if $opt_Z has 0 , '0' or space
!!
>
> Hello all,
>
> I'm trying to get this line to work
>
> (!$opt_Z) ? die "Must supply Market\n" : $mkt = $opt_Z;
>You need parens because assignment is lower precedence than ternary:
>
> (!$opt_Z) ? die "Must supply Market\n" : ($mkt = $opt_Z);
>But the following is equivalent, but more readable:
> $mkt = $opt_Z or die "Must supply Market\n";
>(n.b. "or" is needed instead of "||", since it has super low precedence)
>
>
> and I keep getting compiler errors.
>
>
> Basically I'm trying to consolidate:
>
> if (!$opt_Z) {
> die "Must supply Market\n";
> } else {
> $mkt = $opt_Z;
> }
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]