Thread 2 hash referenzen zusammenführen
(3 answers)
Opened by BumBum at 2009-03-23 10:26 2009-03-23T09:26:54 BumBum nein? Code (perl): (dl
)
1 2 3 4 5 6 my $ref1 = { foo => 23 }; my $ref2 = { bar => 23 }; my %merged = ( %$ref1, %$ref2 ); use Data::Dumper; print Dumper \%merged; Ausgabe: Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wie frage ich & perlintro brian's Leitfaden für jedes Perl-Problem |