in reply to post variables in same order
My idea that running under strict with warnings enabled would reveal that you haven't defined %input -- at least, not in the code you've posted here. If you use CGI.pm, you might find that the query_string() function comes in handy.