Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: data types

by Arien (Pilgrim)
on Jan 11, 2003 at 01:25 UTC ( [id://226029]=note: print w/replies, xml ) Need Help??


in reply to data types

What is the difference between these declarations?
my (@a) = (); # @a contains an empty list my ($b) = {}; # $b contains a ref to an empty (unnamed) hash my (@c) = []; # @c contains a ref to an empty (unnamed) array my (%d) = (); # %d contains an empty list

You may want to (re-)read the documentation on basic data types and references and nested data structures.

— Arien

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2025-01-21 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (62 votes). Check out past polls.