Find the answer to your Linux question:
Results 1 to 3 of 3
Is there a way to test CGI scripts written in PERL from the command line? It can be hard to find the bugs in CGI scripts when the only available ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319

    PERL and CGI


    Is there a way to test CGI scripts written in PERL from the command line? It can be hard to find the bugs in CGI scripts when the only available error is the Web page that tells you that either your code is wrong or the administrator needs to set something.
    The best things in life are free.

  2. #2
    Linux Newbie
    Join Date
    Aug 2001
    Location
    USA, Texas
    Posts
    217
    You can test a CGI script from the command line just like you would test any other Perl program. You can give the URL string ( ex: perl test.cgi "var1=something&var2=else" ). Also there was a way that you can set the VAR's after you run the perl script, but I can't remember how that goes.
    [ [ SykkN alloc ] initWithThePowerTo: destroyYouAll ];
    /* Don\'t make me use it! */

  3. #3
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Sykkn,

    Thanks for that tip. This really helps me save time when debugging the CGI code. Of course I'm going to be using PHP for this kind of stuff but for right now, I gotta stick to what I know. Thanks again.
    The best things in life are free.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •