|
I keep all my import variables in a hash for safe keeping.
I let these dynamic variables as listed above exist in the main root hash environment (if you could call it that).
so there's %ENV, %GET, %POST, %IP, %DEFAULTS, and %DATABASE. This is safer anyway. measure twice, declare once. I'm still not saying i'm right, but anti-soft reference arguments don't float. Maybe it's the hash. I wonder if a reminder of the beauty of 'local' would also help the case here. After reading dominus's arguments against soft references i still remain. One could spend hours telling you how dangerous using perl is when you use the shebang line. Then, i thought of 'local' and did a test... Error 500 in the face. This doesn't work.
This works.
Which leads me to say. I was wrong. As you fall in love with local (which i have been doing all summer), you must abandon my old ways. Create your hash and check $TEMP{$passcode} instead of $passcode. |
In reply to Re: Re: Re: Many strings make one variable?
by true
in thread Many strings make one variable?
by heezy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |