in reply to Remote web form post
Where do you define and fill $res?
That variable is never defined or filled and therefore is undefined.
Maybe you should consider to use strict and warnings.
Addendum:I had another look at your script and think, there are more flaws than the one I previously mentioned.
- $req should contain a HTTP::Request object; so you should create one.
- POST 'http://...' is missing the correct operator between POST and the URL string
- $ua->request() returns a response object; you should give the variable a better fitting name than $request.
In Section
Seekers of Perl Wisdom