in reply to Question about comparing data values..

how about something like

my %names = ();
map { $names{$_}++ } grep /^names/ keys %INPUT;

this creates a hash %names where each key is unique (earlier entries get clobbered by later ones)--which is what you want--with throwaway values. access the entries by using keys %names.

  • Comment on Re: Question about comparing data values..