in reply to CGI parameters as global variables

Thank you for the quick replies. I think I confused things by using QUERY_STRING in my description. I am using CGI.pm and not %ENV to get the parameters. The reason I need these things in global variables at all is that I am using the following regexp later on:
$SQLStatement =~ s/(\$\w+)/$1/eeg;
That particular statement won't evalute hashes or I would just access the Params hash directly. Jeffa, I hope that answers your question as to why. boo_radley and shotgunefx, I think you hit the nail on the head. I am going to try bringing it into a namespace that way. Thank you.

Replies are listed 'Best First'.
Re: Re: CGI parameters as global variables
by chromatic (Archbishop) on Jun 19, 2002 at 21:31 UTC
    Substituting with values from a hash is possible:
    my %data = ( foo => 'oof', bar => 'rab', ); my $text = "foo/bar"; $text =~ s/(\w+)/$data{$1}/g; print "($text)\n";