Don't ask to ask, just ask | |
PerlMonks |
Re: Hash assignment "odd" nessby ssandv (Hermit) |
on Jun 29, 2010 at 19:35 UTC ( [id://847194]=note: print w/replies, xml ) | Need Help?? |
You seem not to grasp the difference between a list and a string. A string is a single scalar composed of zero or more characters, while a list is a collection of zero or more separate scalars. ($foo) is always going to have an odd number of elements because it contains exactly one scalar. Hash assignment doesn't take a string, it takes a list.
In Section
Seekers of Perl Wisdom
|
|