0 votes
in Perl by
Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

1 Answer

0 votes
by
sub uniqueentr

{

return keys %{{ map { $_ => 1 } @_ }};

}

@array = ("perl","php","perl","asp");

print join(" ", @array), "\n";

print join(" ", uniqueentr(@array)), "\n";
...