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
In reply to Re^2: Can anyone help me to improve this code, please?
by ihb
in thread Can anyone help me to improve this code, please?
by htywky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |