Thread Frage zu Hash (15 answers)
Opened by jason-duff at 2006-01-16 12:13

renee
 2006-01-17 05:58
#61941 #61941
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
nimm einfach noch einen zweiten Hash - wenn Du den anderen Hash wirklich nicht aendern kannst...

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
my $path = './space/dir/';
my %codes = (
'traffic' => \&traffic ,
'packetloss' => \&packetloss,
'JitterIN' => \&jitter_in,
'jitterOUT' => \&jitter_out ,
'PacketLossIN' => \&packet_loss_in ,
'PacketLossOUT' => \&packet_loss_out ,
);

foreach my $path(keys(%dir)){
(my $pathforcode = $path) =~ /\/(.*?)\/[^\/]*$/;
$codes{$pathforcode}->($path,$dir{$path});
}


(in Deinen Code einzufuegen)...
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 Frage zu Hash