ok, i'm stuck on this one. normally i'd plug away at it until i figure it out, but i'm in a bit of a hurry to finish this off (damn deadlines). help would be much appreciated.
i'm trying to decipher some code, and something is not making sense to me. so here we go (the comments are mine) ...
$array = [] #returns a ref to an anonymous array
push @{$array}, { key => "$val", key2 => "$val2" }; #huh?
correct me if i'm wrong ... but from what i can figure, an anonymous numeric array ref is being deferenced, then populated with hash array data?
if not, how do i get data out of this? i don't really feel like using the trial and error method ... i'd like to actually understand what's going on.
my apologies if this is somewhat of an obvious question ... i checked through a bunch of documentation, and found no mention of this ...
thanks
-- steve
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.