in reply to Removing Duplicates from Array Passed by Reference

Ditch the prototype and use the trinary conditional operator in the hash slice (see. Far More Than Everything You've Ever Wanted to Know about Prototypes in Perl and When to use Prototypes? for further pros and cons on the matter)
sub util_remove_duplicates { my %hash; undef %hash; @hash{ref $_[0] eq 'ARRAY' ? @{$_[0]} : @_} = (); return keys %hash; }
That should do the trick.

Update: and something that'll actually do what you requested

sub util_remove_duplicates { @{$_[0]} = keys %{ { map{$_=>1} @{$_[0]} } }; return; }

HTH

_________
broquaint