use warnings; use strict; open my $filehandle, "<", "filename.bed" or die "open: $!\n"; my @data; while (<$filehandle>) { chomp; # remove the line ending character push @data, [ split /\t/ ]; # split the rest and append it to our data }; print $data[0]->[0]; # access the first element of the array # it's a reference, "->" dereferences it # at last, access the first element of the dereferenced array