[Israel.pm] Importing variable

Levenglick Dov-RM07994 RM07994 at freescale.com
Thu Sep 2 00:04:41 PDT 2010


env_defines:
$var1 = 'var1';
$var2 = 'var2';


Main
$ENV{$var1} = $var1;
subroutine($var2);

system("cat $var1 $var2 > file");

 
Best Regards,
Dov Levenglick
SmartDSP OS Development Leader
-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Gabor Szabo
Sent: Wednesday, September 01, 2010 07:52
To: Perl in Israel
Subject: Re: [Israel.pm] Importing variable

On Tue, Aug 31, 2010 at 12:47 PM, Levenglick Dov-RM07994
<RM07994 at freescale.com> wrote:
> Hi,
> Although this is bound to be the oldest question in the book, how do I
> perform the C equivalent of #include "defines.h" in Perl 5.12
> I want to have a separate file that will define variables accessible
to
> all parts of my script. If it makes the answer any easier, they can
> become environment variables (i.e. inserted into %ENV).

Could you give an example on how would you like to *use* it in your
code?

Gabor
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://mail.perl.org.il/mailman/listinfo/perl




More information about the Perl mailing list