marrocco has asked for the wisdom of the Perl Monks concerning the following question:
makes it sound feasible, but I'm not clear on how to specify the content and have been unable to find any examples. Suppose $x contains the data I wish to treat as a file. Where and how to I code it?Use an "undef" as $file value if you want to specify the content directly.
Thanks...my $ua = LWP::UserAgent->new(); my $req = POST $url, Content_Type => 'form-data', Content => [blah => $something, file => [undef,'foo.txt'] ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Uploading a variable as a file usingHTTP::Request::Common
by marrocco (Initiate) on Dec 19, 2001 at 02:28 UTC |