Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Array dereference in foreach()

by haukex (Archbishop)
on Nov 14, 2017 at 14:10 UTC ( [id://1203378]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -wMstrict -MData::Dump -e ' @{$a->{list}} = ();     dd $a'
    { list => [] }
    ...
    { list => [] }
    $ perl -wMstrict -MData::Dump -e ' my @x = @{$a->{list}};  dd $a'
    Can't use an undefined value as an ARRAY reference 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://1203378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-20 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found