On Dec 8, Wiggins d Anconia said:

>> I did the 'in' function for seeing if one element is inside on list like.
>
>While I realize your question is more about creating operators, etc.
>Would 'grep' not work the same as the above?

But his in() function short-circuits; grep() does not.  grep() will keep
going through the ENTIRE list, even if the FIRST element matches.

There's always the first() function from List::Util.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to