Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > how to save output of a command into a hash of arrays

Thread Tools

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

saapa saapa is offline
Junior Member
Join Date: Jun 2009
Posts: 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>

james --> <somepath4>

is this possible??
thanks in advance for the help.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
hash of hash of hash of hash in c++ rp C++ 1 11-10-2011 04:45 PM
Hash of Hash of Arrays Question Älphä Blüë Ruby 5 07-18-2009 07:36 PM
Multidimensional arrays and arrays of arrays Philipp Java 21 01-20-2009 08:33 AM
hash of arrays - appending to one of the arrays Adam Akhtar Ruby 5 03-25-2008 11:53 PM