in reply to RE: Re: Case insensitivity in a hash... Futile effort?
in thread Case insensitivity in a hash... Futile effort?

Tie::CaseInsensitive can be gotten here: Re: case sensitivity in hashes.

Just copy and paste it into your editor, save it, then put it somewhere in your @INC as Tie/CaseInsensitive.pm.

And w/ a multi-dimensional hash, you need to tie each level of the hash. Does that make sense? So you tie the hash %HASH, then you tie $HASH{level1}, and so on down.

  • Comment on RE: RE: Re: Case insensitivity in a hash... Futile effort?

Replies are listed 'Best First'.
RE: RE: RE: Re: Case insensitivity in a hash... Futile effort?
by ChuckularOne (Prior) on Apr 19, 2000 at 05:27 UTC
    I hate sounding ignorant, but once I know what I'm doing I promise to answer questions rather than just ask them.

    How do I add something to @INC. All my books are at work and I'm trying to get this done.

    Your humble servant,
    -Chuck
      There are several ways. But here's the easiest:
      use lib '/foo/bar';
      Adds the path '/foo/bar' to your @INC so it'll be searched. So, for your purposes, if you had installed Tie::CaseInsensitive (or Tie::RecursiveCI, japhy's code, which you should use because then you don't have to retie each level) in '/home/foo/bar/Tie/RecursiveCI.pm', you'd put
      use lib '/home/foo/bar';
      at the top of your code.
RE: RE: RE: Re: Case insensitivity in a hash... Futile effort?
by ChuckularOne (Prior) on Apr 19, 2000 at 04:19 UTC
    Thanks a lot, It makes sense, but I don't think I'd have figured it out :-)
    -Chuck