[lug] variable scope in perl/Tk ?

arnie asherman1 at uswest.net
Thu Apr 13 20:05:49 MDT 2000


Ralf Mattes wrote:

> If this is really the code you run the solution is simple:
>
> > `cp message/warn_template user_msg_{$MODE}_CO_warn`;
>
> < `cp message/warn_template user_msg_${mode}_CO_warn`;
>
> (Assuming that $mode is a global variable. BTW, i would put
> quotes arround TRAINING and PRODUCTION in your anonymous
> subroutines.

Thanks Ralf,
After taking a break for a bit, and getting a fresh look at my code, I saw
the difference in cases, and actually managed to figure out the placement
of braces with a bit of experimentation. Obviously, I am a novice
programmer. I'm curious why you recommend quotes, is it just to make it
explicit that the values are strings?
thanks,
--
arnie sherman
frenomulax at bigfoot.com

"Paradise is exactly like where you are right now, only much, much better."

   - Laurie Anderson






More information about the LUG mailing list