Thread Array - Suchproblem (6 answers)
Opened by pktm at 2007-03-06 20:32

renee
 2007-03-07 12:17
#74848 #74848
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
So würde es gehen:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

use strict;
use warnings;

my @a1 = qw(a d g v 6 z h u t f e 0 n);
my @a2 = qw(h f t u);

my $last_index = (
sort{ $a <=> $b }
grep{ my $i = $a1[$_];
grep{ $i eq $_ }@a2
}(0..scalar(@a1)-1))[-1];

print $last_index;
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 Array - Suchproblem