#!/usr/bin/perl $| = 1; use strict; use warnings; use LWP::UserAgent; sub doSM {     my $i = shift;     my $ua = LWP::UserAgent->new;     $ua->agent("MyApp/P$i ");     # Create a request     my $req = HTTP::Request->new(POST => 'http://testserver/cgi-bin/cgi.pl');     $req->content_type('application/x-www-form-urlencoded');     #$req->content('var1=www');     $req->content('var1=www' . scalar time . '&var2=zzz' . scalar time );          # Pass request to the user agent and get a response back     my $res = $ua->request($req);     # Check the outcome of the response     if ($res->is_success) {         print $res->content;     } else {         print "Bad luck this time\n";     } } for (my $i=1; $i<=100; $i++) { doSM($i) } 1;