If you are running a Windows server you will also need to download active perl from http://www.activestate.com/ as perl is not installed by default with any Windows OS. This will automatically register the .pl extension and register itself with the webserver.
gorgor,
You can use the HTTP::Cookies module to grab the cookies as follows:
$cookie_jar = HTTP::Cookies->new;
$cookie_jar->extract_cookies($content);
Once that information is retrieved into $cookie_jar you can then manipulate it, and/or put it back into the content...
Or you could do the following to parse out the information....
while(<FILE>) {
chomp();
($score,$lines,$file,$dir) = /Score:\s(\d+),\slines:(\d+)\s'(.*)\s+(.*)'/;
}
Hope this helps!
I am a little confused about what you want the exact outcome to be, but.....
If you are trying to return a cookie with your HTML content then this is what you need to do (as documented in perldoc for CGI module):
#################################################
$title = "Example"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.