Thread Trickkiste: join Hash-Keys (18 answers)
Opened by bloonix at 2006-07-17 15:41

bloonix
 2006-07-17 16:00
#68151 #68151
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Ein Sort ist nicht notwendig, ich hatte die Keys rein zufällig in der richtigen
Reihenfolge aufgelistet :-)

Hintergrund ist:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
while (my $row = $sth->fetchrow_hashref) {
for my $db (@{$where{NEW_DB}}) {
$row->{Db} = $db;
for my $user (@{$where{NEW_USER}}) {
$row->{User} = $user;
print "INSERT INTO DB ";
print join(",", map { "$_:'$row->{$_}'" } keys %{$row});
print ";\n";
}
}
}


Ich bin zufrieden.
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread Trickkiste: join Hash-Keys