use Tie::RegexpHash; ## &do_dni and &do_sni ... as before my %dispatch; tie %dispatch, 'Tie::RegexpHash'; %dispatch = ( qr/DNI/ => \&do_dni, qr/SNI/ => \&do_sni, # etc. ); foreach my $fn ( @filenames ) { $dispatch{$fn}->{$fn} }
citromatik
In reply to Re^2: Testing for the presence of a hash key in a filename
by citromatik
in thread Testing for the presence of a hash key in a filename
by NovMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |