From the docs, it looks like $ua->cookie_jar()
expects a hash, either to specify options or to provide a data structure to store the cookies in. I would try
$ua->cookie_jar({});
Also, be aware that the method you are trying to use will only store cookies in memory, so once your script ends, so does your knowledge of said cookies. You may want to look at
http://metacpan.org/pod/HTTP::Cookies
http://www.perl.com/pub/2002/08/20/perlandlwp.html
For examples of both in-memory cookie jars, and file-based ones.
As to why HTTP::Cookie wouldn't return a suitable hash when called they way you did, I'm not sure but it appears that it isn't.