Given that you have prepared your cookies in @cookies, the following code will submit all the cookies:
for (@cookies) { $r->headers_out->add('Set-Cookie' => $_); }
 
Continue to:
Written by Eric Cholet (Logilune) and Stas Bekman (StasoSphere & Free Books).