Re: retrieving key from hash of hashes

2011-04-29 Thread Rob Dixon
On 29/04/2011 10:15, Agnello George wrote: sorry i ment if (stdout == keys (%$retrn{$stdout}) ) { ##so some code } Erm, perhaps if ($stdout == keys %{$retrn{$stdout}}) { But that would compare the value of $stdout with the /number/ of keys in the hash, which is always

Re: retrieving key from hash of hashes

2011-04-29 Thread Uri Guttman
> "AG" == Agnello George writes: AG> sorry i ment AG>if (stdout == keys (%$retrn{$stdout}) ) { AG>##so some code AG> } i don't think you are getting it yet. keys gets you the list of keys ONLY in a list context. == provides a scalar context which will get you the

Re: retrieving key from hash of hashes

2011-04-29 Thread Rob Dixon
On 29/04/2011 10:14, Agnello George wrote: On Fri, Apr 29, 2011 at 2:33 PM, Rob Dixon wrote: On 29/04/2011 09:47, Agnello George wrote: my %retrn = ( 0 =>{ 0 =>' successful'}, 1 =>{ 1 =>'insufficient'}, 2 =>{ 2 =>'txtfile missing'}, 3 =>

Re: retrieving key from hash of hashes

2011-04-29 Thread Agnello George
On Fri, Apr 29, 2011 at 2:44 PM, Agnello George wrote: > On Fri, Apr 29, 2011 at 2:33 PM, Rob Dixon wrote: >> On 29/04/2011 09:47, Agnello George wrote: >>> >>>  my %retrn = ( 0 =>  { 0 =>  '  successful'}, >>>         1 =>  { 1 =>  'insufficient'}, >>>         2 =>  { 2 =>  'txtfile missing'}, >

Re: retrieving key from hash of hashes

2011-04-29 Thread Agnello George
On Fri, Apr 29, 2011 at 2:33 PM, Rob Dixon wrote: > On 29/04/2011 09:47, Agnello George wrote: >> >>  my %retrn = ( 0 =>  { 0 =>  '  successful'}, >>         1 =>  { 1 =>  'insufficient'}, >>         2 =>  { 2 =>  'txtfile missing'}, >>         3 =>  { 3 =>  'bad dir'}, >>         ); >> >> ( i kno

Re: retrieving key from hash of hashes

2011-04-29 Thread Rob Dixon
On 29/04/2011 09:47, Agnello George wrote: my %retrn = ( 0 => { 0 => ' successful'}, 1 => { 1 => 'insufficient'}, 2 => { 2 => 'txtfile missing'}, 3 => { 3 => 'bad dir'}, ); ( i know this hash looks funny , but is the hash i got to use ) suppose $s

Re: retrieving key from hash of hashes

2011-04-29 Thread John W. Krahn
Agnello George wrote: Hi All Hello, I got a hash like this : my %retrn = ( 0 => { 0 => ' successful'}, 1 => { 1 => 'insufficient'}, 2 => { 2 => 'txtfile missing'}, 3 => { 3 => 'bad dir'}, ); ( i know this hash looks funny , but is the hash i g