Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: perl xml and array issue

by fisher (Priest)
on Nov 18, 2010 at 15:36 UTC ( [id://872273]=note: print w/replies, xml ) Need Help??


in reply to perl xml and array issue

print "Colors: " . (join ",", @{$products->{color}})."\n";

Replies are listed 'Best First'.
Re^2: perl xml and array issue
by dezboi (Initiate) on Nov 18, 2010 at 15:40 UTC
    So easy...and yet I couldn't figure this out on my own.

    This simple solution worked wonderfully!

    Thanks a ton, vroom
      look, $products->{colors} is actually a reference to an array. @{ } does dereferencing of a reference. I suggest you to spend 20 mins on perldoc perlreftut. It is small indeed.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-24 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found