guthrie has asked for the wisdom of the Perl Monks concerning the following question:
Now I want more information for each item, so I have this:my @zips=("52544", "52557", "50428", "50219"); foreach $zip (@zips) { ... }
which fails. I have tried multiple permutations, but cannot seem to get the iteration over tuples from an array of tuples right. TIA.my @sites=( ("50049", "city1", "url1"), ("52556", "city2", "url2"), ("50219", "city3", "url3") ) foreach (my $zip, my $name, $my $url) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: list of lists?
by Fletch (Bishop) on Jul 29, 2021 at 04:12 UTC | |
|
Re: list of lists?
by kcott (Archbishop) on Jul 29, 2021 at 05:21 UTC | |
|
Re: list of lists?
by BillKSmith (Monsignor) on Jul 29, 2021 at 10:59 UTC | |
by guthrie (Novice) on Jul 29, 2021 at 11:54 UTC | |
|
Re: list of lists?
by AnomalousMonk (Archbishop) on Jul 29, 2021 at 11:31 UTC | |
|
Re: list of lists?
by parv (Parson) on Jul 29, 2021 at 05:09 UTC | |
|
Re: list of lists?
by karlgoethebier (Abbot) on Jul 29, 2021 at 12:33 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |