Debugging Perl CGI Scrips from the Command Line

For many Perl CGI developers it's always a pain to debug CGI scripts from the command line. Here is a quick way to help you:
$ export HTTP_COOKIE="user_id=abc123"
$ export QUERY_STRING="month=jan&year=2001"
$ ./your-script.cgi

That's it. At least for GET requests. For POST data you need to do the following: Put all your POST data in a file:
...and then set your environment like this:
$ export HTTP_COOKIE="user_id=abc123"
$ export QUERY_STRING=""
...and then run your script:
$ ./scriptname.pl < postdata.txt
Here are some additional links that you might find useful:
Have fun hacking...



Is Heaven for Christians only?

I have just read the comments of Desmond Tutu on News24.com. Obviously he lost the plot :-)

I am not saying that Christians in general always did the right thing during the ages - but in the end we only the Bible to guide us to the truth, and truth is that no one that denies Jesus Christ will enter the Kingdom of Heaven.

The comments of the Nazi's and the KKK also has me confused. I can perhaps still understand that the KKK has some mis placed thinking, but the Nazi's Christian? I don't think so...

Anyway - this was a good self re-evaluation for me.

This page is powered by Blogger. Isn't yours?