in reply to faulty expression prob
First what I've though was that the parens are causing the problem like in print:
$rh=1; $dist=1; print ($rh and $dist) ? 2 : -2
But quick check
#!perl sub aa { $rh=shift; $dist=shift; return ($rh and $dist) ? 2 : -2; } print aa;
has showed me I was wrong :) But I want to point at the issue - be very careful with paren at the beginning of parameters' list.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: faulty expression prob
by parv (Parson) on Apr 04, 2008 at 03:45 UTC |