in reply to Re: Can anyone help me to improve this code, please?
in thread Can anyone help me to improve this code, please?
I would quite likely use a hash instead of a joined OR pattern.
and then instead ofmy %ext; @ext{@ext} = (1) x @ext;
I'd putreturn unless m/$re/
return unless /(\.[^.]+$)/ and $ext{$1};
ihb
|
|---|