Hello all,

I'm trying to write a program to be converted into a cgi file using Network.CGI and Text.Xhtml, and I want to have random numbers in it. Sounds simple, but I need to call the global random generator (I think) and I can't do that in the CGI block, i.e.

cgiTMain = do
            gen <- getStdGen
            ...

simply doesn't work, nor an variation of calling a function in the
cgiTMain block with a type of IO(), which is what I need to get the generator. Is it impossible both to write a program using Network.CGI and have random values? That seems very limiting, the people that wrote Haskell were smarter than that...

Thanks,

Will