fireartist has asked for the wisdom of the Perl Monks concerning the following question:
And the main program "test.pl" which contains.{ var1 => "one", var2 => "two" }
However, when I run test.pl I get the following error message#!/usr/bin/perl -wT use strict; my $conf = do ('G4 HD:Desktop Folder:perl:test:config.pl'); print $conf->{'var1'}, "\n";
I've read the docs on 'use' 'do' and 'require', but I still don't understand what i'm doing wrong.# Use of uninitialized value in print. File 'G4 HD:Desktop Folder:perl:test:test.pl'; Line 6
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: scope with multiple files
by ariels (Curate) on May 22, 2002 at 15:07 UTC | |
by fireartist (Chaplain) on May 22, 2002 at 15:35 UTC | |
Re: scope with multiple files
by oakbox (Chaplain) on May 22, 2002 at 14:30 UTC | |
by IOrdy (Friar) on May 22, 2002 at 15:40 UTC | |
Re: scope with multiple files
by fireartist (Chaplain) on May 23, 2002 at 09:00 UTC |