in reply to Getting the value of cookies in cookies.txt file.

Just scan over the cookies in the object! HTTP::Cookies

$bot->cookie_jar->scan(sub { print "Cookie key ", $_[1], "\n" })

Replies are listed 'Best First'.
Re^2: Getting the value of cookies in cookies.txt file.
by ItsyBitsy (Novice) on May 20, 2012 at 02:19 UTC
    When i try the following code this is what it prints.
    Cookie key at-main Cookie key sess-at-main Cookie key session-id Cookie key session-id-time Cookie key session-token Cookie key ubid-main Cookie key x-main
    What i need is for it to print the value of ubid main and session id. How do i achieve this.
      Okay. I guess i figured it out. I had to replace 1 with 2.

        Okay. I guess i figured it out. I had to replace 1 with 2. But do you have any idea how to store the response into a string.

        use assignment (  $foo = ...; see perlintro )?