I have to interact with a PHP script that receives file uploads using a form. Looking at the code it loops through an array called $_FILES. I need to be able to post to this form using Perl and would like to ask what would be the best way to pass the file names ? Would I use something like WWW:Mechanize ?
Share
It sounds like your question is:
The fact that it is handled with PHP on the backend is irrelevant to the problem.
Note that you need to submit actual files not file names.
WWW::Mechanize is an option, I’d probably use LWP::UserAgent myself, it makes use of HTTP::Request::Common which allows you to select files to upload by passing an arrayref instead of a string.