in reply to Re: Re: CGI problem: trying to assign parameters in a loop
in thread CGI problem: trying to assign parameters in a loop

If it is not a throw away script then you need to attempt at least some good programming practices.

In my experiance I've found that too many simple hacked together CGI scripts stay in production because a) they work and b) nobody has the time/money to fix them. The problem is that 6 months down the line somebody normally has to make a small change, which turns out to be another hack and so on and so forth.

Sometime you have to sit down and say, lets make this work properly and do it in a way that allows simple maintanance.

I have a big problem with embedded HTML in CGI scripts, I might be the one that has to maintain it and then I've got to spend ages trying to work out how it works.

Plus in his code he used the normal perl quoting which means he has to remember to put a \ in front of each quote which is a royal pain in the arse.

What's wrong with:

use File::Basename; $foo = basename($bar);
It's a hell of a lot more obvious what this does than your rexexp.

gav^