Thread map in map (4 answers)
Opened by roooot at 2010-02-09 17:18

pq
 2010-02-09 17:24
#132434 #132434
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
wenn NEWS_LINKS wiederum eine hashref erhalten soll, musst du sowas schreiben:
Code (perl): (dl )
1
2
3
4
5
6
NEWS_LINKS  => { map {
    (
        NEWS_LINKS_LINK => $links{$_},
        NEWS_LINKS_TEXT => $_,
    )
} keys %links }

also innen die runden klammern und ganz aussen nochmal geschweifte klammern.
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 map in map