my $upin = $mech->current_form()->find_input('upload'); $upin->content('the content'); $mech->submit();