in reply to Re: CGI Command Line
in thread CGI Command Line

I also like using Data::Dumper when debugging my CGI scripts.
#!/usr/bin/perl -T use strict; use warnings; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use Data::Dumper; print "Content-type: text/plain\n\n"; my $color=param('color'); print Dumper($color); exit; print "Your chosen color is $color.\n";
# ./color.cgi color=red Content-type: text/plain $VAR1 = 'red';
It's useful when the script is big and all you want is to check a variable in a middle of it.

Replies are listed 'Best First'.
Re: Re: Re: CGI Command Line
by JoeJaz (Monk) on Apr 14, 2004 at 15:16 UTC
    Ooh! Very nice! That's soo much easier that writing my own code to do that type of debugging. Thanks for the tip! Joe