in reply to Removing an element from an array

For an effortless solution, consider Tie::Array::Unique (I fixed the link), by me.
_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: Removing an element from an array
by QM (Parson) on Apr 28, 2004 at 14:09 UTC
    Pardon my pointing, but that was an effortless reply.

    First, the link is wrong. Throwing something in square brackets isn't magic. Try [cpan://Tie::Array::Unique].

    Second, he just said "remove", not "remove duplicates".

    Now, join me in a caffeine hit, and we'll call it a morning :)

    Update: Sorry, Japhy, you're right about the duplicates. I went and had that caffeine, and it seems to have helped.

    Cheers,

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      First, I had "cpan://" at first, and then thought it looked wrong, so I removed the "//". I did check to make sure the link to my home node was correct, but I didn't check the CPAN link.

      Second, I was providing a solution to the OP's second request: I'm sure there's some library function to remove a given element from an array, I just don't know the name. Anybody else know? And what about a function to remove duplicates from an array?

      Given the fact that I posted that node at 4:00am EDT, I'm not sweating it.

      _____________________________________________________
      Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;