in reply to Bizarre Results when Creating a Closure
You can do the closure without needing the explicit $icopy temp variable. Just write the code reference line like:
my $psub = [ sub { $chosen_idx = $_[0] }, $i ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bizarre Results when Creating a Closure
by kyle (Abbot) on May 03, 2007 at 19:18 UTC | |
by thundergnat (Deacon) on May 04, 2007 at 15:35 UTC |