Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Can't use string ("8") as an ARRAY ref while

by kcott (Bishop)
on Apr 17, 2018 at 07:23 UTC ( #1213043=note: print w/replies, xml ) Need Help??


in reply to Can't use string ("8") as an ARRAY ref while

This is a complete guess; although, it may provide a useful hint.

You might have code that's something like this:

$ perl -E 'use strict; my @x = qw{a b c}; my $y = @x; say $y->[1]' Can't use string ("3") as an ARRAY ref while "strict refs" in use at - +e line 1.

When you really wanted something like this:

$ perl -E 'use strict; my @x = qw{a b c}; my $y = \@x; say $y->[1]' b

Note the differences in the assignments to $y.

If that guess doesn't help, you'll need to show us some code (as already requested). Take a look at "How do I post a question effectively?" to see what information we need and how to present it.

— Ken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2020-10-25 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (249 votes). Check out past polls.

    Notices?