>
>I have one array say @test = (1,2,3,2,5). Now if you observe 2 is
>repeating in this array on second position and fourth position.
>
>My requirement is that if such value is repeating twice then i just want
>to remove one value and keep other value.
>
>So my array should look like @test = (1
>I am getting following error while executing perl script
>
>~/irf>perl lsco.pl
>Can't locate List/MoreUtils.pm in @INC (@INC contains:
>/usr/perl5/5.8.4/lib/sun4-solaris-64int /usr/perl5/5.8.4/lib
>/usr/perl5/site_perl/5.8.4/sun4-solaris-64int /usr/perl5/site_perl/5.8.4
>/usr/perl5/site_perl /us
On 2/9/07, Craig Wood <[EMAIL PROTECTED]> wrote:
my $parser = new XML::Parser (
Handlers =>
{
Start => \&handle_start,
End => \&handle_end,
Char => \&handle_text
}
Jeff Pang schreef:
> [un-double]
> @test = grep { ++$hash{$_} < 2 } @test;
Alternative:
@test = grep { !$hash{$_}++ } @test;
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Wed, 2007-01-24 at 22:07 -0500, Bill Jones wrote:
> Does this command give a LOT of output?
>
> perl -V
>
> ???
>
> So, still, when you speak of Perl Core you are still talking about
> many needed modules. Additionally, when you speak of CGI.pm there are
> still other modules which make sen