Programming Languages C# Subjective
Mar 13, 2013

Remove the duplicate data from

@array=(“perl”,”php”,”perl”,”asp”)

Detailed Explanation

sub uniqueentr
 
{
 
return keys %{{ map { $_ => 1 } @_ }};
 
}
 
@array = ("perl","php","perl","asp”);
 
print join(" ", @array), "\n";
 
print join(" ", uniqueentr(@array)), "\n";

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback