in reply to two dice question

As pointed out, you don't want to use qw// to assemble your array. qw stands for "quote words" and is useful for specifying a list of whitespace-separated constant strings without bothering with quotes around each and commas between.

Also, I don't understand the point of your loop:

foreach $dice (@dicearray) { if ( $dice eq $result1) { print "$dice\n"; last; } }
Why aren't you just printing $result1?