in reply to Why -M doesn't work?
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$/.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why -M doesn't work?
by xingjin3131 (Novice) on Feb 15, 2008 at 15:45 UTC |