how to save output of a command into a hash of arrays

Discussion in 'Perl' started by saapa, Jun 12, 2009.

  1. saapa

    saapa

    Joined:
    Jun 12, 2009
    Messages:
    1
    hi all,

    i am new to perl...
    i am trying to put the output of below command into a hash of arrays...

    `find $mypath ! -user mainuser -printf \"\%u \%h\\n\"`;

    this command gives output as

    john <somepath1>
    john <somepath2>
    john <somepath3>
    james <somepath4>
    james <somepath5>


    now what i want is to directly make an hash of arrays which stores :

    john --> <somepath1>
    <sompath2>
    <somepath3>

    james --> <somepath4>
    <somepath5>

    is this possible??
    thanks in advance for the help.
    saapa, Jun 12, 2009
    #1
    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. Philipp
    Replies:
    21
    Views:
    1,109
    Philipp
    Jan 20, 2009
  2. rp
    Replies:
    1
    Views:
    499
    red floyd
    Nov 10, 2011
  3. Adam Akhtar
    Replies:
    5
    Views:
    637
    Adam Akhtar
    Mar 25, 2008
  4. Älphä Blüë

    Hash of Hash of Arrays Question

    Älphä Blüë, Jul 18, 2009, in forum: Ruby
    Replies:
    5
    Views:
    658
    Älphä Blüë
    Jul 18, 2009
  5. Tore Aursand
    Replies:
    3
    Views:
    549
    Anno Siegel
    Sep 16, 2003
Loading...

Share This Page