in reply to Re: Variable Variables
in thread Variable Variables

I don't know if this will help at all, but you could try either:

use strict; use CGI qw(header param); print header; print "The variable is: ", param('variable_name'), "\n";

This will cut off a line, and you just have to reference param() everywhere.

The other option requires that you don't use strict, but it's fairly nifty:

use CGI qw(header param); print header; foreach (param) { $$_ = param($_); }

With this, you'll end up with all the variables translated into Perl variables. For example, a form with item named item will become $item in your script. Someone somewhere said this could potentially be a security risk, but I'm not sure how yet.

Hope this helps. BTW, if anyone knows why the above is bad, please let me know. Thanks.