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]