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


in reply to Re^4: Error "Can't use an undefined value as a HASH reference" while working with generated objects
in thread Error "Can't use an undefined value as a HASH reference" while working with generated objects

the first method, I'm having some trouble with your second, some undeclared varibles...

Its a missing ")"

one pair for if() and another for Dive()