sivaramanm has asked for the wisdom of the Perl Monks concerning the following question:
hello monks,
I have a array, which values are duplicated once in the same array. I need to remove the second occurence value. I have tried as below, but not getting result. Pls help me to solve this
Thanks
Siva
@content = split(/ /, $content); @Original = @content; for ($i=0; $i<=$#content; $i++) { for ($j=0; $j<$i; $j++) { print "$j\n"; if ($content[$i] == $content[$j]) { $Original[$i] = ""; } } } print "@processing";
Back to
Seekers of Perl Wisdom