in reply to using WWW::Mechanize with loops
One method of dealing with 6 files at a time is something like the following:
while ( @files ) { my $num_to_submit = ( @files > 6 ? 6 : @files ); my $f1 = shift @files; my $f2 = shift @files; my $f3 = shift @files; my $f4 = shift @files; my $f5 = shift @files; my $f6 = shift @files; ... $mech->submit_form( ... fname1 => $f1 || '', fname2 => $f2 || '', ... fname6 => $f6 || '', ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using WWW::Mechanize with loops
by Anonymous Monk on Mar 14, 2006 at 04:09 UTC | |
by moklevat (Priest) on Mar 14, 2006 at 14:26 UTC |