in reply to Problem with CGI.pm generated forms

Very common pitfall ... you need to also set the value with the param() method:
param('number',$num + 1); print hidden('number', $num + 1);
I can't remember why off hand though ...

UPDATE: LOL - you think i would have known that from the advice i gave at (jeffa) Re: Unstickying CGI ... Hero Zzyzzx++

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)