in reply to Re: Copying a hash element into an array as a list
in thread Copying a hash element into an array as a list

Yes, the monks did provide what I need. I considered using a hash reference, but I use that same hash natively several other places, just here I need to treat its contents as an array.

Thank you and the other monks!

  • Comment on Re: Re: Copying a hash element into an array as a list

Replies are listed 'Best First'.
Re: Re: Re: Copying a hash element into an array as a list
by dragonchild (Archbishop) on Mar 24, 2004 at 18:22 UTC
    I considered using a hash reference ...

    You mean array reference, right? The reference isn't to what's holding it, it's to what's being held.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

      Yeah. Actually I considered ordering the data in a variety of ways. The Hash of Strings containing Lists makes the most sense to me for my data processing. At some point a light may dawn and I redesign the entire application with a new structure, but not at this point.

      thanks

        Roy Johnson said it earlier, but what you have is not a list, as far as Perl is concerned. Sure, it is a list of letters, in the literal sense of the term, but this is a Perl website. Using terms that have a very specific Perl meaning, but ignoring that meaning and using a more general meaning, is a recipe for disaster. You may be doing it unintentionally, but this is a fairly important concept in Perl. For more information, try running perldoc -q 'between a list' in a terminal, or see an online version at perldoc.com.