Thanks so much for your help Peter. I'm getting a grasp of this. However, I have been using a separate file containing subroutines shared by a few scripts. They have worked previously because I was just requiring it, and all my variables were global. I set up my config file as a package (thanks to you), do I also need to set up my subroutines file as a package?
If so, do I have to explicitly export all the possible return variables in the whole subroutines package? thanks again! Rory On Thu, 2002-07-11 at 13:59, Peter Scott wrote: > At 01:19 PM 7/11/02 -0500, rory oconnor wrote: > >Peter, > > > >Thanks so much for the help! Unfortunately I am not using 5.6. I'd > >like to, but it's not up to me to do the upgrading! Which parts are > >5.6-only, and how can I work around? > > Altered for 5.004... if your perl is older than that, it's time to come > out of the fallout shelter... > > $ cat user > #!/usr/bin/perl -wl > use strict; > use MyConfig; > print "\$foo = $foo"; > print "\@bar = @bar"; > print "%baz = ", join(' ' => %baz); > > $ cat MyConfig.pm > package MyConfig; > use strict; > use Exporter; > use vars qw(@ISA @EXPORT $foo @bar %baz); > @ISA = qw(Exporter); > @EXPORT = qw($foo @bar %baz); > > $foo = "one"; > @bar = qw(two three); > %baz = (four => 4, five => 5); > > 1; > > $ ./user > $foo = one > @bar = two three > %baz = five 5 four 4 > > -- > Peter Scott > Pacific Systems Design Technologies > http://www.perldebugged.com/ > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]