in reply to Passing javascript variables to Perl CGI
One other thing - You should also remember that some people will have JS off or blocked, so having a CGI only alternative is always recommended.
UPDATE: added caveat
grep