Always use strictures (use strict; use warnings). In this case you would have been told that /^*.tmp$/:
^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE .tmp$/ at ...
^ anchors the start of the string and it is meaningless to follow it by * which matches the previous match 0 or more times. Actually you should probably omit the anchor and the (implied) 'skip junk' match in any case. Just use /\.tmp$/.
In reply to Re: Why -M doesn't work?
by GrandFather
in thread Why -M doesn't work?
by xingjin3131
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |