in reply to 3 member list ouput
catfish1116: Further to toolic's reply: Another way to evaluate an array in list context when printing is to interpolate the array into a string:
Note that in the first print statement, evaluating the array in scalar context to get the number of elements in the array had to be forced with the scalar built-in due to the , (comma) operator (see perlop). In the second print statement, the . (string concatenation) operator (perlop again) supplies scalar context. (See also Context tutorial.)c:\@Work\Perl\monks>perl -wMstrict -le "my @lines = qw(one two three); ;; print qq{\@lines array (@lines): number of elements: }, scalar @lines +; print qq{\@lines array (@lines): number of elements: } . @lines; " @lines array (one two three): number of elements: 3 @lines array (one two three): number of elements: 3
And yes, please edit your OP so the janitors don't have to clean up the mess. Please see How do I change/delete my post?
Give a man a fish: <%-{-{-{-<
|
|---|