in reply to WWW-Mechanize

What did you try so far?
Using WWW::Mechanize you'd be able to use : $mech->value( $name, $number ),
but i assume you know since you've read the documentation?... :

$mech->value( $name, $number )
Given the name of a field, return its value. This applies to the current form (as set by the form() method or defaulting to the first form on the page).

The option $number parameter is used to distinguish between two fields with the same name. The fields are numbered from 1.

If the field is of type file (file upload field), the value is always cleared to prevent remote sites from downloading your local files. To upload a file, specify its file name explicitly.

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.