On 2012-03-25 12:02, Chris Stinemetz wrote:
How would I return the values along with the keys that meet the criteria
from the sub routine?

On Mar 25, 2012 10:04 AM, "Rob Dixon"<rob.di...@gmx.com>  wrote:

Keeping with the use of $_, replace the following 'print map' statement to the following:

print map "$_\n", @wanted;

foreach ( @wanted ){
    print "$_:\n";
    foreach ( values %{ $href->{ $_ } } ){
       print "\t$_\n";
    }
}

** OUTPUT **

149:
        2
        2
        1
        1
        1
        2
        2
077:
        ND
        ND
        ND
        ND
        ND
        ND
        ND


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to