in reply to saving a random number while generating a new one

HTML is a stateless protocol. Usually you need external storage to remember anything. In your case I think there is a simple solution though. You can store the values in the link. Use something like print "<a href=\"dice.cgi?rolla=$rolla:rollb=$rollb\">roll again</a>". Check out the CGI documentation how you can access the parameter list

Replies are listed 'Best First'.
Re^2: saving a random number while generating a new one
by friar tux (Novice) on Mar 30, 2011 at 17:17 UTC

    I tried to carry over with the link like you suggested but it doesn't seem to work it still replaces the numbers for some reason.thanx tho it puts me on the right track