Thread 2 Arrays vergleichen (27 answers)
Opened by alexus-777 at 2004-04-22 11:47

renee
 2004-04-22 12:47
#81770 #81770
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
my %hash = ();
my @elemente_beider_arrays = ();
foreach(@A){
$hash{$_}++;
}
foreach(@B){
push(@elemente_beider_arrays,$_) if($hash{$_});
}

print "Diese Elemente sind in beiden Arrays:\n";
print $_,"\n" for(@elemente_beider_arrays);
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread 2 Arrays vergleichen