Combining three arrays of hashes into one?

Discussion in 'Perl Misc' started by Keith Lee, Feb 17, 2006.

  1. Keith Lee

    Keith Lee Guest

    All:
    Is there a way of copying three arrays of hashes into one array for
    future sorting? Thanks!

    Keith
     
    Keith Lee, Feb 17, 2006
    #1
    1. Advertising

  2. Keith Lee

    Matt Garrish Guest

    "Keith Lee" <> wrote in message
    news:p...
    > All:
    > Is there a way of copying three arrays of hashes into one array for
    > future sorting? Thanks!
    >


    @d = (@a, @b, @c)

    Or do you mean something else?

    Matt
     
    Matt Garrish, Feb 17, 2006
    #2
    1. Advertising

  3. Keith Lee wrote:
    > All:
    > Is there a way of copying three arrays of hashes into one array for
    > future sorting? Thanks!
    >


    do you mean 3 arrays of hash references? on what is your sorting based?
    to combine 3 arrays into one, just flatten them:


    my @all = ( @a1, @a2, @a3 );
     
    it_says_BALLS_on_your_forehead, Feb 17, 2006
    #3
  4. Keith Lee

    robic0 Guest

    On Thu, 16 Feb 2006 17:45:45 -0800, Keith Lee <> wrote:

    >All:
    > Is there a way of copying three arrays of hashes into one array for
    > future sorting? Thanks!
    >
    >Keith


    Lookout, I'm asking you post an example to coincode with your what
    ever bullshit question/without example you are posting!
     
    robic0, Feb 17, 2006
    #4
  5. Keith Lee

    Guest

    Thanks! I mean an array of hashes.
    Speaking of sorting, does anyone know of a good quick sort program or
    algorithm so I can sort an array of hashes? Each array element has
    four keys to sort by. Thanks again!

    Keith
     
    , Feb 18, 2006
    #5
  6. wrote in news:1140230909.684967.322460
    @f14g2000cwb.googlegroups.com:

    > Thanks! I mean an array of hashes.
    > Speaking of sorting,


    It looks like you are talking to yourself. Please quote some context when
    you post a reply.

    Sinan

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Feb 18, 2006
    #6
  7. Keith Lee

    Rick Scott Guest

    ( uttered:)
    > Thanks! I mean an array of hashes.
    > Speaking of sorting, does anyone know of a good quick sort program or
    > algorithm so I can sort an array of hashes? Each array element has
    > four keys to sort by. Thanks again!


    The command "perldoc -q keyword" searches the Perl FAQ. If you would
    have asked it about "sort", it would have given you a perfectly good
    answer to your frequently asked question:

    perldoc -q sort
    # How do I sort an array by (anything)?

    Please read the posting guidelines, and look over the Perl FAQ and
    documentation to see if they answer your question before posting it
    here.

    http://mail.augustmail.com/~tadmc/clpmisc.shtml




    Rick
    --
    key CF8F8A75 / print C5C1 F87D 5056 D2C0 D5CE D58F 970F 04D1 CF8F 8A75
    The Perl motto is "There's more than one way to do it."
    Divining how many more is left as an exercise to the reader.
    :perl(1) manpage
     
    Rick Scott, Feb 18, 2006
    #7
  8. <> wrote:

    > Thanks!



    To whom?

    For what?

    Please quote some context in followups like everybody else does.

    Have you seen the Posting Guidelines that are posted here frequently?


    > Speaking of sorting, does anyone know of a good quick sort program or
    > algorithm so I can sort an array of hashes?



    Sure, anybody who has looked up sorting in the Perl Frequently
    Asked Questions knows how to do that.

    You should become one of those people.

    perldoc -q sort


    > Each array element has
    > four keys to sort by.



    The FAQ answer shows how to sort based on multiple sort keys.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Feb 18, 2006
    #8
  9. Keith Lee

    robic0 Guest

    On Fri, 17 Feb 2006 23:37:15 GMT, "Frank J. Russo" <> wrote:
    On Thu, 16 Feb 2006 17:45:45 -0800, Keith Lee <> wrote:

    >>>All:
    >>> Is there a way of copying three arrays of hashes into one array for
    >>> future sorting? Thanks!
    >>>
    >>>Keith


    >>Lookout, I'm asking you post an example to coincode with your what
    >>ever bullshit question/without example you are posting!


    >That was unnecessary. Your choice of words / limited vocabular, would make
    >one not even want to pay attention to you no matter what you have to say.
    >Words have meaning. Use them properly.
    >


    Its hard not to be rude to the Christian God people like you.
    You didn't quote, so I did it for you.

    This is Usenet, this isin't your local church gathering. If my limited vocabulary
    bothers you, perhaps you should filter out my posts and not trouble yourself so much.

    If this is a relative of yours, I had no intentions to offend him as not anyone else
    (except for a select few that I know).

    However, you on the otherhand. You can kiss my goddamed fucnkin ass !!!!
     
    robic0, Feb 22, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Holness

    Hashes of Hashes via subs

    Ben Holness, Oct 5, 2003, in forum: Perl
    Replies:
    8
    Views:
    589
    Ben Holness
    Oct 8, 2003
  2. Edward Wijaya

    Joining 2 arrays into hashes

    Edward Wijaya, Jun 1, 2004, in forum: Perl Misc
    Replies:
    20
    Views:
    251
    Ben Morrow
    Jun 4, 2004
  3. Perl Learner

    Hashes of hashes or just one hash ?

    Perl Learner, Jun 8, 2005, in forum: Perl Misc
    Replies:
    11
    Views:
    232
  4. Tim O'Donovan

    Hash of hashes, of hashes, of arrays of hashes

    Tim O'Donovan, Oct 27, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    233
  5. Francois Massion

    Arrays instead of files into hashes

    Francois Massion, Jan 12, 2009, in forum: Perl Misc
    Replies:
    15
    Views:
    208
Loading...

Share This Page