Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Data::Dump 'pp'; ... calc($data); sub calc { my $data = shift; foreach my $account ( keys %{$data} ) { my $number = $data->{$account}; my $zip = pop @{ $number->{zip}[1][4]}; pp $zip; insert_zip($zip); } } =data ( [ "Name", "Add", "Date", "email", ], [ "Joe Doe", "100 - Main St.", "12/31/2014", "X", "010101", ], [ "Carl Tet, "200 - Test Street", "12/31/2010", "C", "010101", ], [ "Mary G", "127 _ Rol Ro Street", "11/22/2014", "A", "010101", ], [ "Matt Carr, "2 - New Street", "12/15/2004", "B", "010101", ], ) =cut
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Issue with POP in array ref.
by choroba (Cardinal) on Sep 15, 2015 at 15:15 UTC | |
|
Re: Issue with POP in array ref.
by SuicideJunkie (Vicar) on Sep 15, 2015 at 15:47 UTC | |
|
Re: Issue with POP in array ref.
by trippledubs (Deacon) on Sep 15, 2015 at 15:12 UTC | |
|
Re: Issue with POP in array ref.
by stevieb (Canon) on Sep 15, 2015 at 15:17 UTC | |
|
Re: Issue with POP in array ref.
by RichardK (Parson) on Sep 15, 2015 at 15:28 UTC |