You can also force list context without changing @_ by assigning to an empty list.
The scalar value of a list assignement is the number of elements in the list on the right side of the assignment. This yields the number of elements returned by localtime (not the number of elements in the empty list, that would be dull).scalar ( () = localtime(time) );
--bwana147
In reply to Re: Re: what is scalar?
by bwana147
in thread what is scalar?
by kiseok7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |