Please don't do that. Use a hash that stores all the adresses:
package Mailer; our( %TO ); $TO{ Chennai }= 'sriram.perumalla@ness.com'; package main; print $TO{ Chennai };
If you want to learn about why it's a bad practice, read http://perl.plover.com/varvarname.html and the two follow-up parts.
In reply to Re: Dynamically name the variable and get it's value from Module
by Corion
in thread Dynamically name the variable and get it's value from Module
by sriram83.life
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |