Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

RE: RE: Re: redeclaring variables with 'my'

by Fastolfe (Vicar)
on Nov 11, 2000 at 02:39 UTC ( [id://41044]=note: print w/replies, xml ) Need Help??


in reply to RE: Re: redeclaring variables with 'my'
in thread redeclaring variables with 'my'

If it were tightly de-allocating and re-allocating, is it not unreasonable to expect that they might end up at the same address? Not that I disagree with you; I'm hardly the expert. I rather think that what you say is actually the case.

But yah, I think tilly's hit it on the head.

  • Comment on RE: RE: Re: redeclaring variables with 'my'

Replies are listed 'Best First'.
RE (tilly) 4: redeclaring variables with 'my'
by tilly (Archbishop) on Nov 11, 2000 at 03:04 UTC
    It would be reasonable, but it doesn't work that way. In fact here is a piece of code that triggers an illustrative bug in how it does work:
    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); } }
    Try that. It does something weird. And here are the details of what does happen.
      This makes sense. I wasn't disagreeing, though. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://41044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-04-19 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found