http://www.perlmonks.org?node_id=11144134


in reply to Re^2: Purpose of =~ and = in this statement
in thread Purpose of =~ and = in this statement

Glad to help! And yes, writing quick test scripts is one of my personal favorite ways to learn things like this.

Side note: I don't know what the original author's intentions were, but it may be worth considering that any $chapter containing 5, including 15, 50, etc. will all be silently converted to 5.