vlturner has asked for the wisdom of the Perl Monks concerning the following question:
Ugh, my tea hasn't kicked in and I need a nudge please. I have 250K row of 1K data. Element 77 is the application name and element 93 is the IP Address. I need to create an array off applications, and the member IP address that belong to it. For some reason I am placing the string name of the application where a numeric is expected. This is just the snippet of code not reflective of its true placement. Alas, beer consumtion over Sunday Night Football, has lowered my Monday morning cafein levels. Need loaner brain cells....
my @members; my $key = \@members; my @application; print "Application = ", $data[$application_pos], "\n"; if ( $data[$application_pos] ne "" && $data[$ip_address_pos] n +e "" ) { $key = $data[$application_pos]; $application[$key] = $data[$application_pos]; push $application[$key], $data[$ip_address_pos]; print Dumper( @application ) ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array of Arrays on Monday.
by stevieb (Canon) on Jan 25, 2016 at 15:25 UTC | |
by vlturner (Sexton) on Jan 25, 2016 at 15:50 UTC | |
by choroba (Cardinal) on Jan 25, 2016 at 15:56 UTC | |
by vlturner (Sexton) on Jan 25, 2016 at 16:52 UTC | |
by AnomalousMonk (Archbishop) on Jan 25, 2016 at 20:01 UTC | |
by poj (Abbot) on Jan 25, 2016 at 17:27 UTC | |
by vlturner (Sexton) on Jan 25, 2016 at 19:58 UTC | |
by poj (Abbot) on Jan 25, 2016 at 20:17 UTC | |
by vlturner (Sexton) on Jan 26, 2016 at 14:03 UTC | |
by poj (Abbot) on Jan 26, 2016 at 14:14 UTC | |
by vlturner (Sexton) on Jan 25, 2016 at 15:36 UTC | |
by stevieb (Canon) on Jan 25, 2016 at 15:40 UTC | |
by vlturner (Sexton) on Jan 25, 2016 at 16:54 UTC | |
|
Re: Array of Arrays on Monday.
by AnomalousMonk (Archbishop) on Jan 25, 2016 at 20:08 UTC |