Graham Barr Wrote:
>Well if there ever is a way to shortcut grep this could be genera;ized
>to
>
>  my $index = grep { break if $_ eq $seek; 1 } @items;

Wouldn't this also assume that grep return the number of times the block was
NOT true, rather than it's current implementation of the number of times it
IS true? I think that in the example, grep would simply return either '1' or
'0', unless there was some easy way to say:

    my $index = grep { while( $_ ne $seek) } @items;

I might be wrong here, though. It's still early.
Grant M.
[EMAIL PROTECTED]


Reply via email to