ramachandrajr has asked for the wisdom of the Perl Monks concerning the following question:

What if i wanted variables in a cookie rather than scalarsi.e

$cookie = new CGI::Cookie(-name=>'CookieName',-value=>$value);

Replies are listed 'Best First'.
Re^2: CGI::Cookie
by Corion (Patriarch) on Aug 27, 2015 at 07:21 UTC

    What problem do you encounter with the code you currently have?

      sorry for the late reply first of all ,i started a blog based on perl(never programmed a web back end before), i was planning to use a cookie for holding in all the details of a user loading them from the database like name, b'day ,qualification etc ,such that i can use them in the posts they make so that they don't need to put em in .i was doubting using a variable derived from db data instead of a string,i figured it out anyways that its possible.sorry about all the mess.

        This is an insecure and dangerous approach. Please do not do it. If you have already done it, please redo it or at least notify your users that any data posted, registered with your site is unsafe. See also: Re: Secure Perl Coding Standards.