Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Comment on


For the wantarray, i see the usefulness, but i was commenting on moving the return outside of the ?:. It's not really a big deal, but it would look something like:
return wantarray ? ($_,'blah') : $_;
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:

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.


In reply to Re^3: findone { coderef } @array by jynx
in thread findone { coderef } @array by shotgunefx

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (17)
    As of 2014-07-10 12:39 GMT
    Find Nodes?
      Voting Booth?

      When choosing user names for websites, I prefer to use:

      Results (209 votes), past polls