Re: Questions about private variables

2002-04-06 Thread Larry Wall
Piers Cawley writes: : Um... there'd be a syntax error before that. \\= should be //= surely? The //= operator is spelled \\= on Windows. ;-) Larry

Questions about private variables

2002-04-05 Thread Joe Gottman
I just read Exegesis 4, and I have a few questions about private variables. First, is it possible to have 2 private variables of the same name in different functions? For instance, what would happen in the following code? sub func1() { our $varname is private \\= 1; return

Re: Questions about private variables

2002-04-05 Thread Piers Cawley
Damian Conway [EMAIL PROTECTED] writes: Joe Gottman wrote: For instance, what would happen in the following code? sub func1() { our $varname is private \\= 1; return $varname; } sub func2() { our $varname is private \\= 2; Fatal error: Private variable $varname declared