This example script solves exactly that problem.
In reply to Re: LWP cookie mystery by dws in thread LWP cookie mystery by Anonymous Monk