Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: reading and writing a CGI cookie in the same page

by dws (Chancellor)
on Feb 21, 2003 at 02:52 UTC ( [id://237322]=note: print w/replies, xml ) Need Help??


in reply to reading and writing a CGI cookie in the same page

You've already gotten an answer to the question you posed, so I'll add a minor coding suggestion.

You can eliminate a conditional by writing

push @new_cookies, cookie_creator_sub() if <<some condition>>; ... $q->header(-cookie => [ @new_cookies ]);
If @new_cookies is empty, no cookies are added. This approach gives the flexibility of adding additonal cookies without having to modify existing code.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://237322]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found