Maybe you're better off using something heavy like WWW::Mechanize. Then you probably don't have to figure out why you're getting a 404 (hint: your url is probably wrong). UPDATE: yeah, the comments below seem to indicate the 404 happens when the server is AWOL or overloaded or something.
I almost made the snippy comment "Did you actually read the error message?" as soon as the OP was posted, but I tested it first. The url is correct. The page seems to send a 404 when it doesn't see the args it expects.