in reply to Re: Re: findone { coderef } @array
in thread findone { coderef } @array
For the end hook, you have a start index, you can receive an extra scalar as the end index, and only pick it up if they've put in a start index as well. Prototype would be kinda like:return wantarray ? ($_,'blah') : $_;
findone { code } @list
findone { code } @list, $start_index
findone { code } @list, $start_index, $end_index
So if they know they don't need to walk further than a certain place on the array they can be certain to stop there.
jynx
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re^3: findone { coderef } @array
by shotgunefx (Parson) on Feb 26, 2002 at 19:33 UTC |