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


in reply to SImulation of an Inventory.

Your script causes my perl (AS 5.14) to throw multiple messages... had you included use strict (as you should have), it would have filled the screen with your problems. But these are what you should have told us about, at a minimum, rather than tossing them into the "not working" garbage pile:

Unquoted string "easy" may clash with future reserved word at D:\_Perl +_\pl_test\977910.pl line 6. Unquoted string "hard" may clash with future reserved word at D:\_Perl +_\pl_test\977910.pl line 9. Found = in conditional, should be == at D:\_Perl_\pl_test\977910.pl li +ne 13. Unquoted string "easy" may clash with future reserved word at D:\_Perl +_\pl_test\977910.pl line 13. Unquoted string "hard" may clash with future reserved word at D:\_Perl +_\pl_test\977910.pl line 16. Found = in conditional, should be == at D:\_Perl_\pl_test\977910.pl li +ne 20. Found = in conditional, should be == at D:\_Perl_\pl_test\977910.pl li +ne 47. Name "main::RNG" used only once: possible typo at D:\_Perl_\pl_test\97 +7910.pl line 21. D:\_Perl_\pl_test\977910.pl syntax OK

Try another iteration... show us how you solved these.