> Hi,
> 
> Is there a method to pass a shell assigned variable to perl?
> 
> For ex:
> 
> ABC=xyc
> 
> perl -ne 'print $ABC'
> 
> In awk you could use ENVIRON["varname"], is there something 
> compatible in perl.
> 

You can do the same in perl with the  special hash named %ENV.
for instance: print $ENV{'SHELL'}

or you can use the env module:
perldoc -f env


THanks
Jim

 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.772 / Virus Database: 519 - Release Date: 10/1/2004
 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to