Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Anonymous structures

by Boogman (Scribe)
on Jul 31, 2000 at 18:48 UTC ( [id://25271]=perlquestion: print w/replies, xml ) Need Help??

Boogman has asked for the wisdom of the Perl Monks concerning the following question:

Are anonymous structures created in the same way as non-anonymous structures? For example if I say something like this,
my $arrayref = [1, 2, 3];
is that any different from saying the following?
my $arrayref; { my @array = (1, 2, 3); $arrayref = \@array; }
Are the two array parts allocated any differently or anything like that? The places I've read about anonymous structures don't really get into it so I'm assuming that they aren't, but I'm kind of curious to see if thats true or not.

Thanks

Replies are listed 'Best First'.
Re: Anonymous structures
by merlyn (Sage) on Jul 31, 2000 at 18:49 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-28 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found