in reply to $var$cnt problems
This kind of calling convention will break use strict however so it is something that I personally steer clear of.
Another approach would be to create a hash and store your fields in there e.g.:
my %fields = ( fname1 => 'John', fmail1 => 'john.lizmore@something.com', fname2 => 'Lisa', fmail2 => 'lisa.lizmore@something.com' );
Update: thanks to Transient for pointing out an error in my variable name.
Update2: merlyn says PLEASE do not suggest to people to use softrefs! I downvoted your node for that. How kind of merlyn to send me that message. I do want to point out that I believe merlyn did not read this article, as I also discourage the use of softrefs. As a result, to assist some of the skim-readers on this site, I have gone back and bolded the appropriate statement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $var$cnt problems
by sgifford (Prior) on Jul 08, 2005 at 18:44 UTC | |
|
Re^2: $var$cnt problems
by merlyn (Sage) on Jul 09, 2005 at 08:11 UTC | |
by monarch (Priest) on Jul 09, 2005 at 13:30 UTC | |
by merlyn (Sage) on Jul 09, 2005 at 17:38 UTC | |
by Anonymous Monk on Jul 09, 2005 at 19:17 UTC |