Close, but no cigar. You were assigning an array (the @_) to a scalar, which translates to the number of elements in the array.
You want:
$hash{$1} = [split /,/, $2];
Which creates the anonymous arrayref you were mentioning, which lives quite happily as a scalar
In reply to Re: list vs array context: odd error message...
by swiftone
in thread list vs array context: odd error message...
by jynx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |