Thread smartmatch (11 answers)
Opened by torsten at 2011-05-16 13:44

pq
 2011-05-16 14:35
#148684 #148684
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
wozu das doppelt gemoppelte @{[@array{@keys}]}?
da dürfte dann auch einfach @array{@keys} reichen.
dann müsste es stimmen, und sieht auch nicht mehr so eklig aus.
Code (perl): (dl )
1
2
my @keys = keys %old;
if ([@keys] ~~ [keys %new] and [@old{@keys}] ~~ [@new{@keys}])


ohne die arrayrefs hat das bei mir nicht geklappt, aber ich kenn mich mit dem operator noch nicht so aus.
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 smartmatch