Hi -
1) Variable names consist of a type ($ @ % ...) followed by
[a-zA-Z0-9_] so your variable $e-mail is an invalid name
(perl would read this as $e - mail and choke. It should be
my $e_mail;
(but this was prob only your typo).
2) assign the value to move it to another variable:
my $email_id001 = $e_mail;
3) now as to 'variable' variable names, $email_id$i, you
have to get too fancy to do this in _normal_ scripts
(read up on 'eval' if you really want this).
4) BUT, perl has this wonderful 'array' type; you can
easily do what you want like this:
my @email_id;
my $i = 0;
$email_id[$i] = some email varaible...;
$i = 22;
$email_id[$i] = some other email...;
...etc...
Aloha => Beau.
-----Original Message-----
From: Nandita Shenvi [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 3:47 AM
To: [EMAIL PROTECTED]
Subject: problems with variables
hallo All,
My problem, i will explain in terms of an example:
I have variable $e-mail the value of the var is an e-mail address, now I
would like to to store the value of the variable under another name for
example email_id001 or email_id$i, where $i is just a interger.
The problem may seem simple to many of u, but i do not have much experience
in perl and would be rather grateful for ur help.
thanks
nandita
Nandita Shenvi
Appartment Nr. 707
Westhoffstr. 15
44791 Bochum
Germany
0234/5844456
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]