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


in reply to end of line help

... and uncomment that #use strict;.

Strict exists to help you; to highlight typos, for example that have you acting on a variable different than the one you intended.

And just to make your life (and learning) easier, enable warnings as well