Thread "Unter"-Hash move'en? (25 answers)
Opened by bianca at 2009-10-18 14:22

pq
 2009-10-18 14:52
#127072 #127072
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
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: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread "Unter"-Hash move'en?