Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Understandig on Creating Empty array reference

by davido (Cardinal)
on Dec 16, 2005 at 09:23 UTC ( [id://517179]=note: print w/replies, xml ) Need Help??


in reply to Understandig on Creating Empty array reference

A doubt would be tendancy toward disbelief. What you have is a question.

$array = \(); doesn't create a reference to an empty array. You probably want $array = [];

\() creates individual references to each entity inside of the (). Since there is no entity inside of your (), no reference is created. [] is the anonymous array constructor. That's what you're looking for.


Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found