Hey Jason,

My MUA believes you used (X-Mailer not set)
to write the following on Friday, November 09, 2001 at 9:00:17 PM.

You can use %ENV to access the environment (variables).

<untested code>
foreach $env_var (sort keys %ENV) {
    print "$env_var = $ENV{$env_var}\n";
}
</untested code>

JYh> Hi Alfred, Base on your answer, I added my idea and changed the
JYh> script as:

JYh> $name1_perl="MaryGibson";

open IT, ">>t3.bat";
JYh> print IT "\@echo off\n";
JYh> print IT "set name1_dos=$name1_perl\n";
JYh> print IT "\@echo name1_dos=%name1_dos%\n";
JYh> close IT;
JYh> system ( "t3.bat" );

JYh> The contain of $name1_per1 ,MaryGibson, is transfer to
JYh> DOS shell as contain of name1_dos.  Thank you very
JYh> much.  

JYh> Vice versa, I will @echo %name1_dos% > t4.txt in batch
JYh> file, then use perl script filehandler to read t4.txt
JYh> and assign to $name1_perl.  If you have better way,
JYh> please let me know.  Thanks again


>> 
>> 
>> > Thank you very much.  I tested successfully.  One
>> more
>> > question that how can I transfer the variables of
>> in
>> > Perl Script to DOS batch or vice versa (e.g.
>> > "$name1_perl=..." in Perl; "set name1_dos=..." in
>> DOS
>> > Batch)
>> >



-- 
[EMAIL PROTECTED]
Using The Bat! (http://www.ritlabs.com/the_bat/) eMail v1.53d
Windows NT 5.0.2195 (Service Pack 1)
Junk: stuff we throw away. Stuff: junk we keep. 

----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to