Robert Cumming wrote:
Hi,

I've been happily using where (for conditional plotting) since I was
pointed to it here some time ago.  Now I've run into a problem.

This works for me:

points ($y->where($dsigma<10),$sigma->where($dsigma<10));

but this doesn't:

points ($y->where($dsigma<10 and $v>100),$sigma->where($dsigma<10 and $v>100));


The problem here is the 'and' operator - it does not work with multi-element piddles. What you want is to use '&' instead:


$a=sequence(10)
print $a->where($a > 2 & $a < 7)
[3 4 5 6]

Also useful to know are 'any' and 'all'

                        J.


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to