Leser: 1
|< 1 2 >| | 19 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
my %hash = (
val1 => 1,
val2 => 2,
val3 => 3,
);
for my $key (keys %hash) {
print ",$key:$hash{$key}";
}
print join(",", (print "$_:$hash{$_}" for keys %hash));
print join( ',', map { "$_:$hash{$_}" } keys %hash );
1
2
3
4
5
6
7
my %hash = (
val1 => 1,
val2 => 2,
val3 => 3,
);
print join ',', map {$a = "$_:$hash{$_}";$a} sort keys %hash;
val1:1,val2:2,val3:3
print join( ',', map { "$_:$hash{$_}" } keys %hash );
print join( ',', map { "$_:$hash{$_}" } keys %hash );
1
2
3
4
5
6
my %hash = (
val1 => 1,
val2 => 2,
val3 => 3,
);
print join( ',', map { my $x = "$_:$hash{$_}"; $x } keys %hash );
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";
}
}
}
1
2
3
4
5
6
my %hash = (
val1 => 1,
val2 => 2,
val3 => 3,
);
print join( ',', map { my $x = "$_:$hash{$_}"; $x } keys %hash );
|< 1 2 >| | 19 Einträge, 2 Seiten |