We always recommend you put "use strict;" at the start of each program
If you had done so, and added "my" to each variable, the compiler would have told you:
Variable "$rolldie" is not imported at test-dice.pl line 9.
Variable "%tally" is not imported at test-dice.pl line 18.
Variable "%tally" is not imported at test-dice.pl line 19.
Global symbol "$rolldie" requires explicit package name at test-dice.p
+l line 9.
Global symbol "%tally" requires explicit package name at test-dice.pl
+line 18.
Global symbol "%tally" requires explicit package name at test-dice.pl
+l
All of which you would need to fix, in order to get your program to work.
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
-Larry Wall, 1992