in reply to print a hash

You can try this also.

@newarray = grep (!$uniques{$_}++, @array);

Prasad