Hi Irfan, Please find the following way......... @a = (1,2,3,4,2,3,5);
print "---> @a\n"; my %b = undef; foreach (@a){ print "--- $_"; $b{$_} =undef; } @a = keys(%b); print "\n### @a"; rgds, Rajeev Kilaru On 2/13/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote:
Hi All, I have one array having values as follows User [EMAIL PROTECTED] User [EMAIL PROTECTED] User [EMAIL PROTECTED] Now I formatted above array as per your suggession as follows in order to remove duplicate value "User" @test = grep { ++$hash{$_} < 2 } @test; but output is as follows which is not proper User [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] I need output in this fashion [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Please help Regards Irfan. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/