Your
other post featured the use of
-w, which is great, but there's no
use strict, and that can be dangerous. When debugging, it can sure save your bacon, so make it a habit. It's mean, it complains a lot, but that's just tough love.
If you make a
$cookie_jar then you can supply that to your function like
$ua->cookie_jar($cookie_jar) instead of doing it twice, as you have questioned yourself doing, though you will want to make sure the
$cookie_jar is initialized with the parameters in your second instance.
IlyaM points out a feature of
HTTP::Request::Common below which I mistook for an error. Never had any use for these before, I suppose, and bracketless function calls are hard to parse at times.