Q1: How do I use the Cookie Library?

Answer

To use the Cookie Library in your CGI scripts:

  1. Include the library at the top of your script:
    require "cookielib.pl";
  2. Set a cookie:
    &SetCookie("cookie_name", "value", "30d");
  3. Get a cookie:
    $value = &GetCookie("cookie_name");
  4. Delete a cookie:
    &DeleteCookie("cookie_name");
Back to CookieLib FAQ Next Question