debug cgi programs with post forms

Hi all, How do i debug cgi programs where the html contains a post form ? If it contains a get form it is easy because i can run perl -d from the command line. In this case i have a very large form with many variables and it is a post form. How can i debug it ? I made a google search and found answers like printing the environment