in reply to multiple keys hash with array as a value - loop
for my $connection (keys %h) { print "Looking at connection '$connection'\n"; for my $userid (keys %{$h{$connection}}) { print "\tLooking at userid '$userid'\n"; @a_ref = @{$h{$connection}{$userid}}; if(lc($userid) eq "rmdb_dbo") { print @a_ref, if ( $a_ref[1] =~ m/update\s*[table\s*]rmdb_ +dbo./i ); } else { print "Not checking '@a_ref' because user is not 'rmdb_dbo +'\n"; } } }
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multiple keys hash with array as a value - loop
by grandagent (Novice) on Dec 08, 2021 at 20:13 UTC |