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


in reply to Text Based Perl Game

There are three places where you:

if (xxx = yyy) {

which is not to be what you want. You have correctly used == elsewhere so you know about the difference between equality (==) and assignment (=) operators. The error is particularly bad because you get warnings during game start up that tell you about the problem!

Your 'main' sub contains a whole bunch of code that will never execute because mainMenu never returns.

True laziness is hard work