in reply to Re: a natural way of expressing things
in thread a natural way of expressing things

Are there are any advantages in using any from List::MoreUtils over using grep?

if ( grep { $expression eq $_ } $val1, $val2, $val3 ) { ... }

Just wondering as I'm not really familiar with that module.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^3: a natural way of expressing things
by FunkyMonk (Bishop) on Jul 08, 2007 at 17:58 UTC
      scalar context list context
    grep looks at the entire list and returns the number of times the expression was true returns the list of things that matched
    any only looks at as much of the list as it needs to. ie it will stop after the first true condition.

    I've never tried a table on PM before. It looks OK(ish) here. Please /msg me if it's a disaster on other platforms.

    update: I was using <table border-width=1> instead of border=1. Thanks to holli for noticing.