in reply to scalar in list context

This is just an explanation code, Crackers2 and ikegami explained it all well, however, notice the context of the assignment in both cases when the scalars are surrounded with () and when they're not ...
#title "scalar in list context" my @array = qw(zero one two); my ($listItemOne, $listItemTwo, $listItemThree); #CASE ONE ##assign array to different scalars, notice the ()## ($listItemOne, $listItemTwo, $listItemThree)=@array; #CASE TWO ##This assigns the length of @array to $var3 ##generates alot of complaints if warnings on... $var1, $var2, $var3=@array; print $var1,"\n"; print $var2,"\n"; print $var3,"\n"; print $listItemOne,"\n"; print $listItemTwo,"\n"; print $listItemThree,"\n";


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.