http://qs1969.pair.com?node_id=11135474


in reply to list of lists?

I believe that this is what you are trying to do. Note the square brackets (Making References)to create array references and the syntax @$tuple (Using References) to dereference them.
use strict; use warnings; my @sites=( ["50049", "city1", "url1"], ["52556", "city2", "url2"], ["50219", "city3", "url3"] ); foreach my $tuple (@sites) { my ( $zip, $name, $url ) = @$tuple; ...; }

Update: Added Links, corrected typo

Bill

Replies are listed 'Best First'.
Re^2: list of lists?
by guthrie (Novice) on Jul 29, 2021 at 11:54 UTC
    Thank you very much (everyone), this is just what I wanted - I couldn't figure out the "@$tuple" syntax.