Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a hash whose values are an array of file contents.I am trying to get a for loop going for each line the value as below.For some reason the for loop is not entered.When I debugged,the array value is like below.Can someone advise what am I doing worng?
@{$grep_lines{$filename}}= ARRAY(0x...) my %grep_lines; foreach $mk(@{ $grep_lines{ $filename } }) { #doesnt enter the loop }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to access the hash array values?
by chromatic (Archbishop) on Apr 30, 2011 at 18:51 UTC | |
by Anonymous Monk on Apr 30, 2011 at 19:25 UTC | |
by Gulliver (Monk) on Apr 30, 2011 at 20:36 UTC | |
by cdarke (Prior) on May 01, 2011 at 06:57 UTC | |
|
Re: How to access the hash array values?
by Khen1950fx (Canon) on May 01, 2011 at 11:01 UTC |