Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: dereferencing question

by swl (Prior)
on Jan 17, 2025 at 05:31 UTC ( [id://11163721]=note: print w/replies, xml ) Need Help??


in reply to dereferencing question

The @ and % sigils indicate you want a list and not a scalar.

If you use an array directly then you get a warning. I'm not sure why it does not appear for array derefs.

perl -E"use warnings; my @array = (1..3); print @array[2];" Scalar value @array[2] better written as $array[2] at -e line 1.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2026-03-17 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.