A LIST in SCALAR context returns its last item. An ARRAY in SCALAR context returns its count.
A LIST in ARRAY/LIST context returns a LIST. An ARRAY in ARRAY/LIST context returns a LIST.
That gets just about everyone at one time or another. It flat *BOGGLED* me for a while. Try this: perl -e 'print scalar( (1,2,3,4) ),$/'
--
$you = new YOU;
honk() if $you->love(perl)
In reply to Re: Something Strange is Afoot Here
by extremely
in thread sort mechanism
by readey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |