in reply to RE: RE: Re: redeclaring variables with 'my'
in thread redeclaring variables with 'my'
Try that. It does something weird. And here are the details of what does happen.recurse_lex(1); print "\n"; recurse_lex(2); print "\n"; recurse_lex(3); print "\n"; recurse_lex(4); print "\n"; sub recurse_lex { my $i = shift; my @array if 0; unshift @array, $i; print @array, "\n"; $i--; if ($i) { recurse_lex($i); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE (tilly) 4: redeclaring variables with 'my'
by Fastolfe (Vicar) on Nov 11, 2000 at 03:07 UTC |