I am really new at Perl and have been trying to piece together a solution for this. When I run this program I don\'t get any errors and it doesn\'t display anything.
Try this out:
use strict;
use warnings;
use Data::Dumper;
use List::MoreUtils qw;
my $column = first_index { $_ eq 'Ball' } split /\t/, ;
say Data::Dumper->Dump( [ $column ], [ '*column' ] );
my @balls = map { [split /\t/]->[$column] } ;
say Data::Dumper->Dump( [ \@balls ], [ '*balls' ] );
__DATA__
Camera Make Camera Model Text Ball Swing
a b c d e
f g h i j
k l m n o
You would pretty much have to change the handle from DATA
to some file you open
-ed.
open( my $in, '<', '/path/to/data.file' )
or die "Could not open file: $!"
;
And then substitute for
<$in>
.