in reply to Re:(5): Perl Internals - references and symbol table
in thread Perl Internals - references and symbol table
{ my %position; sub elements(\@;$) { my $arr = shift; my $amt = shift || 1; if(not exists $position{$arr} or $position{$arr} < $#$arr) { my ($start, $next) = ($position{$arr}, $position{$arr} += +$amt); return @$arr[$start .. $next - 1]; } else { delete $position{$arr}; return; } } }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^6: Perl Internals - references and symbol table
by shotgunefx (Parson) on Nov 18, 2002 at 13:37 UTC | |
by Aristotle (Chancellor) on Nov 19, 2002 at 23:48 UTC | |
by shotgunefx (Parson) on Nov 20, 2002 at 04:17 UTC |