http://www.perlmonks.org?node_id=11132716


in reply to Saving HTTP::Cookies into Netscape format using bless/re-bless

Assuming $jar is your original cookie jar, you can just do:

require HTTP::Cookies::Netscape; $jar->HTTP::Cookies::Netscape::save("mycookies.txt");

No need to rebless. It could cause problems if save calls helper methods on $self which aren't defined in the parent class. But reblessing also could cause problems, so shruggles.