in reply to Re^4: libwww-perl basics
in thread libwww-perl basics

OK, then try it like this:

for my $header ($response->headers->header_field_names) { ... }

...roboticus

Replies are listed 'Best First'.
Re^6: libwww-perl basics
by Anonymous Monk on Aug 13, 2010 at 10:42 UTC
    That works (thank you), although (somewhat oddly) all of the cookies (multiple headers with the same field name) are run together.
    for my $header ($response->headers->header_field_names) { print $header, ": ", $response->header($header), "\n"; }
    That produces:
    [...] Set-Cookie: cookiea; expires=[time]; path=/; domain=.example.comcookie +b expires=[time]; path=/; domain=.example.comcookiec expires=[time]; +path=/; domain=.example.com; HttpOnly [...]
    I can live with that for now.