P is for Practical | |
PerlMonks |
Re: scalar context confusionby peterdragon (Beadle) |
on Feb 28, 2008 at 10:45 UTC ( [id://670880]=note: print w/replies, xml ) | Need Help?? |
When you access an array in scalar context, it returns the number of elements. You can make this explicit so
By surrounding it in quotes you are asking for the values to be interpolated into a string separated by $" (default space character). See http://perldoc.perl.org/perldata.html or type "perldoc perldata" for more information.
In Section
Seekers of Perl Wisdom
|
|