RSS Forums RSS

perl/Cookie... basic question

Please support our Perl advertiser: Programming Forums
Reply
Posts: 93
Reputation: localp is an unknown quantity at this point 
Solved Threads: 2
localp localp is offline Offline
Junior Poster in Training

perl/Cookie... basic question

  #1  
Dec 4th, 2008
i want to create a perl /CGI program Cookie, where the username can be remembered even if the browser is shut down and restarted. i am new to Perl programming, and i have no clue from where to start on this, but i am aware on how to set cookies, but when the browser is quit the saved values disappear..

so will some one plzzz help me with a sample code i am lost
Local P ...
AddThis Social Bookmark Button
Reply With Quote  
Posts: 843
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 63
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: perl/Cookie... basic question

  #2  
Dec 4th, 2008
Are you familiar with the CGI module? You can set and read cookies with the module. See the CGI documentation for details.

http://perldoc.perl.org/CGI.html#HTTP-COOKIES

There is also the CGI::Cookie module
Reply With Quote  
Posts: 93
Reputation: localp is an unknown quantity at this point 
Solved Threads: 2
localp localp is offline Offline
Junior Poster in Training

Re: perl/Cookie... basic question

  #3  
Dec 4th, 2008
Originally Posted by KevinADC View Post
Are you familiar with the CGI module? You can set and read cookies with the module. See the CGI documentation for details.

http://perldoc.perl.org/CGI.html#HTTP-COOKIES

There is also the CGI::Cookie module



i couldn't find any thing productive there..

wat i want to do is to create a perl persistent cookie ?? how do u code for this
Last edited by localp : Dec 4th, 2008 at 1:03 pm.
Local P ...
Reply With Quote  
Posts: 843
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 63
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: perl/Cookie... basic question

  #4  
Dec 4th, 2008
There is no such thing as a perl cookie. On the server end they are generally refered to as sessions, on the client side, they are called cookies. But there is no such thing as a perl cookie so I am not sure what you are wanting to do.
Reply With Quote  
Posts: 52
Reputation: mitchems is an unknown quantity at this point 
Solved Threads: 0
mitchems's Avatar
mitchems mitchems is offline Offline
Junior Poster in Training

Re: perl/Cookie... basic question

  #5  
Feb 5th, 2009
Use an HTTP Cookie from the perl module mentioned above and set an expiration date into the future. That will store the cookie on the client's machine and it will retransmit it to your server. But storing the username is not a very secure solution.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the Perl Forum
Views: 871 | Replies: 4 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:08 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC