in reply to Re: Re: Re: Best way to match items in an array
in thread Best way to match items in an array

Actually, I was thinking that I would have to code something like:

my %handlers = ("zip" => \&zip, "zaaap" => undef, "txt" => \&txt, "ini +" => \&misc, "foo" => \&misc, ....);
That is, if I have 50 different file types, do I need 50 different "end" => \&handler entries?

In addition, my suffixes may not be known until the script is run...

$ echo '$0 & $0 &' > foo; chmod a+x foo; foo;