in reply to compile errors
To access a hash element you need to use $hash{key}, not %hash{key}. So change
map { %tmp{$_}=1 } @_;to
map { $tmp{$_}=1 } @_;Or consider using the uniq function from List::MoreUtils (which has the added benefit of preserving order in your array).
|
|---|