Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: list of lists?

by Fletch (Bishop)
on Jul 29, 2021 at 04:12 UTC ( [id://11135458]=note: print w/replies, xml ) Need Help??


in reply to list of lists?

Your extra parens don't do anything (as far as preserving structure) and you wind up with everything flattened out in one big array. You need a list of arrayrefs to initialize your array in order to keep your sub-lists distinct. See perllol and perldsc as well as perlreftut if you need the basics on references.

my @sites = ( [ "blah", "city", "url1" ], ... ); for my $row (@sites) { my( $zip, $name, $url ) = @{ $row }; ...; }

The cake is a lie.
The cake is a lie.
The cake is a lie.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-18 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found