in reply to Re: comparing list to 2 cells in array
in thread comparing list to 2 cells in array

This seems like it would work very well. I have ran it, and I'm getting an error "%table requires a specific package name". I looked this up, and so I know that it is because I'm using "Use Strict" and I need to declare something. I saw someone about declaring vars, defs, and something else, but didn't understand it. So can I just declare %table to get it to work? I looked at it, and normally my %table should work, because it is local, but, the code didn't like it anyway. Thanks, Carrie
  • Comment on Re: Re: comparing list to 2 cells in array

Replies are listed 'Best First'.
Re: Re: Re: comparing list to 2 cells in array
by DamnDirtyApe (Curate) on Jul 26, 2002 at 19:32 UTC

    What OS/Perl version are you running? This works fine for me on RH7.3, with Perl 5.6.1.


    _______________
    D a m n D i r t y A p e
    Home Node | Email
      Its Perl v5.6.1, but on Windows2000 Standard server.

        Hmm... sounds like it had ought to work then.

        • Are you using the code exactly as I posted, or modified somehow?
        • Are you using the sample data I posted, or your real data? Is my sample data the same format as your data?
        • What is the exact error given, including line number?

        _______________
        D a m n D i r t y A p e
        Home Node | Email
Re: Re: Re: comparing list to 2 cells in array
by fglock (Vicar) on Jul 26, 2002 at 20:12 UTC

    Actually, you declared a hash %table and used an array @table.

    Update: my fault. I just learned that you can write things like @table{ 'ip', 'ip2', 'country', 'region' } = split ;