in reply to Re^4: Local for lexicals
in thread Local for lexicals
Maybe this is a repetition of a question already asked--possibly even asked and answered--but having re-read the thread, I cannot see it. So here goes:
{ #outer scope $lamb = lambda ( $x, $y, $z ) => sub { $x + $y } }This is, in a sense, the crux of my problem—I don't want the values of $x, $y, and $z to leak from the inside out, or vice versa,
What are you trying to achieve that this doesn't?
my( $x, $y, $z ) = ( 1,2,3 ); my $lamb = do{ my( $x, $y, $z ) = ( $x, $y, $z ); lambda ( $x, $y, $z ) => sub { $x + $y } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Local for lexicals
by JadeNB (Chaplain) on Aug 12, 2009 at 19:17 UTC |