On Oct 30, 3:34 am, [EMAIL PROTECTED] (Jeff Pang) wrote: > On 10/30/07, howa <[EMAIL PROTECTED]> wrote: > > > Consider the example below... > > > Config.pl > > ====== > > > #!/usr/bin/perl -w > > > my $value = "abc"; > > change 'my' to 'our'. > > > > > 1; > > > Script.pl > > ====== > > require "Config.pl"; In addition to changing 'my' to our' in Config.pl, you'll also need to add the 'our $value;' to Script.pl > > > print $value; # How to do this, beside using .pm? > > > Thanks. > Here's another option.
Config.cfg ========== $value = "abc"; Script.pl ========= #!/usr/bin/perl use strict; use warnings; our $value; do 'config.cfg'; print $value; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/