http://qs321.pair.com?node_id=977920


in reply to SImulation of an Inventory.

"..What am I doing wrong?"
Several! Please, use use strict; you will catch some.

In your if statements you assign. I think what you intended was

if($diff == 'hard'){...}

You also have several barewords in your code..