in reply to Stringified hash
use strict; use warnings; my %hash = ( A => 'a', B => 'b', C => 'c', D => 'd', E => 'e', F => 'f' ); print "@{[%hash]}"; while(my ($key, $value) = each(%hash)) { $hash{$key} = '= '.$value.' AND'; } my $query = 'SELECT row_id FROM Table WHERE '.substr("@{[%hash]}",0,-4 +); print "\n\n$query\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Stringified hash
by dragonchild (Archbishop) on Apr 12, 2004 at 12:32 UTC | |
by Anonymous Monk on Apr 12, 2004 at 16:53 UTC | |
by dragonchild (Archbishop) on Apr 12, 2004 at 16:56 UTC | |
by fizbin (Chaplain) on Apr 12, 2004 at 15:24 UTC |