$ub->cookie_jar = $ua->cookie_jar; #### use HTTP::Cookies; .. $ua = LWP::UserAgent->new; $ua->agent($MOZILLA); $ua->cookie_jar(new HTTP::Cookies); $res = $ua->request(GET $url); #the $ua->cookie_jar is set hereafter $post = &fillForm(\$res, \%FW, $form); # fillout form # Creating a new UserAgent $ub $ub = LWP::UserAgent->new; $ub->agent($MOZILLA); $ub->cookie_jar(new HTTP::Cookies); $ub->cookie_jar = $ua->cookie_jar; #crash # now this cookie of $ub has to be the same as of $ua # I just don't get it and # I don't want to save and load a file due to permissions $res = $ub->request($post); $post = &fillForm(\$res,\%FW,'msgO',$nSMS); # fillout next Form # create 3rd UserAgent $uc $uc = LWP::UserAgent->new; $uc->agent($MOZILLA); $uc->cookie_jar(new HTTP::Cookies); $uc->cookie_jar = $ub->cookie_jar; #crash # Again this cookie must be the same as # the 2 others before $res = $uc->request($post); ...