http://www.perlmonks.org?node_id=1006135


in reply to Re: need help to print some lines
in thread need help to print some lines

without taking anything away from toolic beautiful solution, one can also still write this:

use warnings; use strict; my $array_organizer = [ [], [] ]; while (<DATA>) { push @{ $array_organizer->[0] }, [split]->[0]; push @{ $array_organizer->[1] }, [split]->[1]; } for my $value ( @{$array_organizer} ) { print map { $_ } @{$value}, $/; } __DATA__ a f b g c h d i e j