Re: use strict and load

2005-07-05 Thread Wiggins d'Anconia
Ken Killer wrote: > I load the config file in the main program using do, > > #!perl > do "conf"; > use strict; > print "value of v is $v\n"; > > and the config file has only one line, > > $v = 'hello'; > > when I run the main.pl, it reports following error,

Re: use strict and load

2005-07-04 Thread Shobha Deepthi
Youare trying to print the value of $v before its declaration print "value of v is $v\n"; Try defining this variable before this print statement. Shobha Deepthi V The statement below is true. The statement above is false. Ken Killer wrote: I tried to add 'my' before $v, but I got same

Re: use strict and load

2005-07-04 Thread Ken Killer
I tried to add 'my' before $v, but I got same error as before. On 7/5/05, Chris Devers <[EMAIL PROTECTED]> wrote: > On Mon, 4 Jul 2005, Ken Killer wrote: > > > I load the config file in the main program using do, > > > > #!perl > > do "conf"; > > use strict; > > print "value of v is $v\n"; > > --

Re: use strict and load

2005-07-04 Thread Chris Devers
On Mon, 4 Jul 2005, Ken Killer wrote: > I load the config file in the main program using do, > > #!perl > do "conf"; > use strict; > print "value of v is $v\n"; > > and the config file has only one line, > > $v = 'hello'; Have you tried making that my $

use strict and load

2005-07-04 Thread Ken Killer
I load the config file in the main program using do, #!perl do "conf"; use strict; print "value of v is $v\n"; and the config file has only one line, $v = 'hello'; when I run the main.pl, it reports following error, how to fix this? Global symbol "$v" requ