So, $key is a string, "Mon" in the first iteration. Then, you use the expressionforeach $key (@a)
It tries to dereference $key as an array reference, but it is not: it is a scalar string. Hence the error.${$key}[0]
In reply to Re: Cant use string(_) as array ref..!!
by choroba
in thread Cant use string(_) as array ref..!!
by reaper9187
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |