Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Cant use string(_) as array ref..!!

by choroba (Chancellor)
on Jan 24, 2013 at 09:17 UTC ( #1015111=note: print w/replies, xml ) Need Help??

in reply to Cant use string(_) as array ref..!!

Let's analyze it. @a is an array of strings. Next, you iterate over it with
foreach $key (@a)
So, $key is a string, "Mon" in the first iteration. Then, you use the expression
It tries to dereference $key as an array reference, but it is not: it is a scalar string. Hence the error.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015111]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2016-10-28 18:03 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (386 votes). Check out past polls.