On Wed, 21 Aug 2002 16:22:10 +0200, [EMAIL PROTECTED] (Alex) wrote:
> I was thinking of using the "IO::Socket::INET" module - is that > possible? if so, how? > If you just want to upload a file to your cgi program, but don't want to deal with a web form to do it, use LWP in a script. ######################################################### #!/usr/bin/perl use warnings; use strict; use HTTP::Request::Common qw(POST); use LWP::UserAgent; my $url ='http://zentara.zentara.net/~zentara/cgi-bin/up1.cgi'; my $file = 'testout.tgz'; my $ua = new LWP::UserAgent; my $req = POST $url, Content_Type => 'multipart/form-data', Content => [ file => [$file] ]; my $res = $ua->request($req); if ($res->is_success){print $res->as_string; }else{print $res->status_line; } exit 0; ####################################################### -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]