aalneyperl has asked for the wisdom of the Perl Monks concerning the following question:
my $sgv = $dbh->prepare("show variables"); $sgv->execute(); while (($keyword, $value) = $sgv->fetchrow_array()) { print "$keyword=$value\n"; } I try to do the following... is this right? need help desperately..... my $sgv = $dbh->prepare("show variables"); $sgv->execute(); while (($keyword, $value) = $sgv->fetchrow_array()) { print $keyword, $value; %mysql{$keyword}=$value; print %mysql{"back_log"}; } This is the original output when the command runs in mysql. mysql> show variables; +---------------------------------+----------------------------------- +-------+ | Variable_name | Value + | +---------------------------------+----------------------------------- +-------+ | back_log | 50 + | | basedir | / + | | binlog_cache_size | 32768 + | | bulk_insert_buffer_size | 8388608 + | | character_set_client | latin1 + | | character_set_connection | latin1 + | | character_set_database | latin1 + | | character_set_results | latin1 + | | character_set_server | latin1 + |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to access hash value based on user defined condition.
by andreas1234567 (Vicar) on Nov 21, 2007 at 09:51 UTC | |
|
Re: How to access hash value based on user defined condition.
by olus (Curate) on Nov 21, 2007 at 13:11 UTC |