|
Thread Array-Werte in Hash übertragen
(14 answers)
Opened by RalphFFM at 2008-04-20 12:16 pq+2008-04-21 11:10:07-- Mein Kleinhirn-Perl-Parser hat da was mit local durcheinandergebracht! ( das ist natürlich ein ganz anderer Mechanismus!) Code (perl): (dl
)
1 2 3 4 5 6 7 use strict; use warnings; my @a=qw/1 2 3 4 5 6 7 8 9/; my %hash; local $hash{foo}="bar"; local @hash{qw/vorname nachname plz ort haustier foobar/} = @a; TMTOWTDYOG (there's more than one way to dig your own grave)
|