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

Joined
Jun 12, 2009
Messages
1
Reaction score
0
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top