something is wrong with this..

say %yahoo's key contains the variable , X

I wanted to go through the @array which has array of hashes... to see if one of the value is equal to
X and if it is, wanted to assign the key of the @array to $ex_var..

Tracing the program, it only goes through 6 lines of keys in @t_array (random keys) (it has 89 keys total).. what am i doing wrong?




     while (my ($keys,$values) = each(%yahoo) ) {
             no strict 'refs';
             MF: for my $i (0 .. $#t_array) {
                     for ( my($k,$v) = each(%{ $t_array[$i] } ) ) {
                         my $keys_b = qr/$keys/;
                         if ( $v  =~ m/$keys_b/ ) {
                             $ex_var = $k;
                             last MF;
                     }
                  }
             }

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to