in reply to Re: Creating variables while using 'strict'
in thread Creating variables while using 'strict'
re: para2... I need the loop because I am testing and resetting the data depending on what is submitted, but thanks for the tip.
As to the rest of your comments, the code was there in an atttempt to highlight what I was trying to do. I know it's messy and I don't use variable names like those shown in those examples. I had preciously asked the question about declaring groups of variables but got no response. I had seen my ($firstvar, $secondvar, $thirdvar) used on this site and thought it was correct. I'll use our ($firstvar, $secondvar, $thirdvar) in future!
Example 3 is a messy attempt (that works) to get my $fieldname = $q->param('fieldname') for each field in the HTML doc while also checking and resetting the data within the loop. I didn't like it either.
Anyway, based on the responses above and your comments, I propose the use a hash as in example 4.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Creating variables while using 'strict'
by diotalevi (Canon) on Jan 06, 2003 at 07:14 UTC |