for(@LS) { #go through @LS 1 by 1, putting array ref into $_ print "$el @{$_}"; #print each line converting arrayref into array for printing ## or you could do print "$_->[1]";# to print just the team name... etc } #### my @line = split('\|',$_); print "Team: $_->[1] Score: $_->[0]"; print "Innings"; for(my $i = 2; $i <= 11; $i++) { print "$_->[$1]"; } print "";