1. ALWAYS have "use strict" and "use warnings" as the first 2 lines in your
script.
2. This will fix your problem as Perl wants variables to be declared in the
form of "$varable", "@variable" or "%variable".

So try this:
my $CREATEDINQUALIFIER;
my $created_in;
$CREATEDINQUALIFIER = $created_in = $ENV{'LOCAL_DB_ID'};

(unless I did not understand your problem).

Regards!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Wong, Danny H.
Sent: Friday, November 03, 2006 8:22 PM
To: Sisyphus; khozaima shakir; perl-win32-users@listserv.ActiveState.com
Subject: Expanding environment variables


Hi Perl GURU's,
        In my Perl script, I read a text file and parse each line
delimited by the first "=" character and create environment variables
for each line of data. My question is: is there a way to expand the
environment variable when trying to assign an environment variable value
as part of the line of data?


Example:
Text file example:
DB_ID="tst"
#
#
MODIFIED_TIME=-3:0:0:0
#
CREATEDINQUALIFIER=created_in=$ENV{'LOCAL_DB_ID'}


$ENV{'CREATEDINQUALIFIER'} gives me "created_in=$ENV{'LOCAL_DB_ID'}"
value. I'll like it to receive the following value "created_in=tst"; 

Any suggestions?



     - - - - - Appended by Scientific Atlanta, a Cisco company - - - - - 
This e-mail and any attachments may contain information which is
confidential, proprietary, privileged or otherwise protected by law. The
information is solely intended for the named addressee (or a person
responsible for delivering it to the addressee). If you are not the intended
recipient of this message, you are not authorized to read, print, retain,
copy or disseminate this message or any part of it. If you have received
this e-mail in error, please notify the sender immediately by return e-mail
and delete it from your computer.

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to