I've used this code on my website for years without issue. Recently, it appears that my host upgraded the shared hosting server that I use and now I receive an error Undefined subroutine &URI::Escape::escape_char called at /usr/local/share/perl/5.10.1/URI/_query.pm line 51. This occurs when I post a form in perl. I realize that scalars I'm posting have characters that are reserved in URI even though this worked before, so I tried using uri_escape() to no avail. I've spent 10 hours or so now trying to figure this out. I am out of ideas and need your wisdom!
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use HTTP::Request::Common;
my $URLtoPostTo = "http://www.theurltopostto.com";
my %Fields = (
"data1" => "$email",
"data2" => "$somethingelse",
"data3" => "$andanother"
);
my $BrowserName = "This Be Mine";
my $Browser = new LWP::UserAgent;
if($BrowserName) { $Browser->agent($BrowserName); }
my $Page = $Browser->request(POST $URLtoPostTo,\%Fields);
#I don't need the results data