What is wrong with the code hdb gave you?
That code does not have the problem your code has, so why are you not using it?
As a hint, a string is always true in Perl. And your code simply constructs a string but never matches against it:
... if ("(".join('|', @{$opts->{params}}).")" # This constructs a string and !grep { /^$_/i } keys %$format) # and this matches $_ agains +t itself ...
In reply to Re^4: check parameters
by Corion
in thread check parameters
by ag4ve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |