#! usr/bin/perl while (<>) { $input = $_; #I strip the raw input of extraneous info to #get the letters and numbers which are each #made into variables #This part of the code is working well and is thus omitted $lets = $input; $nums= $input; $plates{$lets} = $nums{0}; } foreach $licPlate (keys %plates) { print "$licPlate "; }