in reply to Re^2: using WWW::Mechanize with loops
in thread using WWW::Mechanize with loops

In this context @files returns the number of elements in the array @files. This ternary operator expression (@files > 6 ? 6 : @files) works like this:

my $number_to_submit=@files; if @files > 6 then $number_to_submit = 6; else $number_to_submit = @files;

So this limits the number of files to submit to 6 if there are more than 6 files in the array @files.