in reply to Dynamically name the variable and get it's value from Module
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.
|
|---|