Please, show more code. Also take a look to WWW::Mechanize.
In reply to Re: Small problem with handling cookies by Gangabass in thread Small problem with handling cookies by roryne