in reply to Eliminating addresses in bulk
in thread Not case sensitive hash?

Why all the effort? perl -e'@uniq{map lc, <>}=(); print keys %uniq' listfile

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Eliminating addresses in bulk
by rir (Vicar) on Oct 26, 2002 at 06:02 UTC
    My is very much faster on large inputs than yours. They are very different.

    Hint, wink, wink, wink. I don't think anyone got the joke. I'll know better next time.

      Oh, right. An array will take less memory and is faster, true.

      Makeshifts last the longest.

        Oh yes, really fun! the code above will truncate your file; perlopentut says:

        Mixing Reads and Writes
        It is possible to specify both read and write access. All you do is add a "+" symbol in front of the redirection. But as in the shell, using a less-than on a file never creates a new file; it only opens an existing one. On the other hand, using a greater-than always clobbers (truncates to zero length) an existing file, or creates a brand-new one if there isn't an old one. Adding a "+" for read-write doesn't affect whether it only works on existing files or always clobbers existing ones.

        If you don't like spammers, like me, don't answer to their questions, ok?

        Valerio