in reply to WWW::Curl mysterious header values persisting

You reset $hdr, but you still keep the filehandle $fh open to it. I'm surprised that the results are rather benign.

If you want to modify $hdr while still keeping the filehandle open, I suggest that you manipulate $fh instead:

seek $fh, 0, 0; truncate $fh;

Replies are listed 'Best First'.
Re^2: WWW::Curl mysterious header values persisting
by mje (Curate) on Jun 28, 2011 at 18:29 UTC

    Thanks corion, I thought it might be something obvious and didn't see that.

      Just to confirm. Replacing "$hdr = ''" with "seek $fh, 0, 0;truncate $fh, 0;" fixes the problem. I was seeing.