Thread "Unter"-Hash move'en?
(25 answers)
Opened by bianca at 2009-10-18 14:22
wenn %hash2 vorher leer ist, geht auch:
Code (perl): (dl
)
1 2 3 4 5 my $tmp = delete $hash{ebene1}; %hash2 = %$tmp; # oder gleich %hash2 = %{ delete $hash{ebene1} }; edit: %test in %hash umbenannt Last edited: 2009-10-18 16:58:45 +0200 (CEST) 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 |