my @new=map { exists $hash{$_} ? $hash{$_} : $_ } @array;