in reply to Re: perl script without cgi
in thread perl script without cgi

This is broken.

As for the first bullet point, you might think that your code allows for multiple values, but it doesn't. If you have multiple values for one param name, you simply concatenate them. Consider the following:

color=red&color=blue

In your code, that results in:

$in{ 'color' } == 'redblue'

That's probably going to cause someone problems.

Hope you don't take this personally, and welcome to the Monastery! :)

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Replies are listed 'Best First'.
Re: (Ovid) Re: Re: perl script without cgi
by chlige (Initiate) on Nov 08, 2001 at 03:22 UTC
    And that is why all my CGI scripts now start as such:
    #!/usr/bin/perl
    
    use CGI;
    
    That subroutine was something I worked with about 5 years ago, but then I moved to CGI.pm when I had trouble with all the points you brought up. That and cutting and pasting was a pain in the rumpus.

    The code that can be written
    is not the eternal Code.
    The typeglob that can be named
    is not the eternal Typeglob.
    - The Tao of Perl