K 1 J 2 L 3 H 4 #### file 01 K 01 JK 1234 J 02 HJ 5678 L 03 JH 6789 H 04 IH 5467 #### @filelist --------- file 01 file 02 file 03 file 04 file 05 file 06 #### my @array; open F, "$input_file" or die "Couldn't Open File: $!"; while () { chomp; ( my ( $name, $num ) = split / /, $_ ) ; push (@array, $name); } foreach my $name (@array) { }