943,891 Members | Top Members by Rank

Ad:
  • Perl Discussion Thread
  • Unsolved
  • Views: 1739
  • Perl RSS
Dec 4th, 2008
0

perl/Cookie... basic question

Expand Post »
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
Reputation Points: 1
Solved Threads: 3
Junior Poster
localp is offline Offline
190 posts
since Apr 2008
Dec 4th, 2008
0

Re: perl/Cookie... basic question

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
Reputation Points: 246
Solved Threads: 67
Practically a Posting Shark
KevinADC is offline Offline
898 posts
since Mar 2006
Dec 4th, 2008
0

Re: perl/Cookie... basic question

Click to Expand / Collapse  Quote originally posted by KevinADC ...
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 2:03 pm.
Reputation Points: 1
Solved Threads: 3
Junior Poster
localp is offline Offline
190 posts
since Apr 2008
Dec 4th, 2008
0

Re: perl/Cookie... basic question

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.
Reputation Points: 246
Solved Threads: 67
Practically a Posting Shark
KevinADC is offline Offline
898 posts
since Mar 2006
Feb 5th, 2009
0

Re: perl/Cookie... basic question

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.
Reputation Points: 26
Solved Threads: 38
Posting Whiz in Training
mitchems is offline Offline
293 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Perl Forum Timeline: In perl script system("cd c:\mnt"); is not working.
Next Thread in Perl Forum Timeline: perl arrays





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC