my @result; foreach my $c (@array) { next if $b =~ /^Individual/; next if $b =~ /^000\d+/; next if $b =~ /^\w+/ ; ($loga, $logb, $x, $y) = split (/ /,$c); push @result,$x,$y); } print join("\t",@result);