And without any explanation, you just supplanted his cargo-cult for another cult.
"Cargo cult" programming means "You have learned that if you do *this* random nonsense, you get the benefits."
To break the cycle, the original poster must learn that there are no mysteries, that the actions are not random nonsense, and that they can get bigger benefits from understanding.
Anonymous Monk, the suggestion to use the CGI module is a good one. Please read CGI as the barest of explanation of its capabilities. Many Perl books will suggest CGI over other approaches, too.
Your original code only barely attempts to handle the parsing of $ENV{QUERY_STRING}, but there are a lot of ways this can go wrong if you're not careful. The CGI module is a predefined library which has been debugged over the past several years to handle all these problems in a consistent way.
-- [ e d @ h a l l e y . c c ]
|