foreach my $line (@the_cell_site_lines) { my @data = split /\s+/, $line; # If you want the cellnumber, do the following... my $cell_number = $data[12]; $cell_number = substr($cell_number, 2); # Do something here with the cellnumber you now have. }