open(PBXNUM1, ">pbxnum1"); open(MYINPUTFILE, "pbxnum"); my $hash = $pbxex; while () { chomp; $hash {$_} ++; print PBXNUM1 "$_$hash{$_}\n"; }