Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by kcott (Archbishop)
on Apr 17, 2018 at 07:23 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1213043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-23 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found