From: "Alexander Farber (EED)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 5:13 AM
Subject: Please make "last" work in "grep"


> Here I am looking for a button with a special name - "Delete ..." -
> and there can be only one such button, so I have to interrupt the
> "grep" after I find it
I'd rather see grep have split-like magic, where it sees the length of the
list
it is being assigned to, and stops when it has filled the list.

So ($a, $b) = grep /!(.*)/, qw(1 4 0 5 !0!0 98 46 !9 !097!0!9080"; would
stop looking after it had found and returned 0!0 and 9, and never even
glance at the 98.  Basicly, if you assign to a list of lvalues, @returnlist,
it
will stop looking after it has found scalar(@returnlist) matches or
end-of-input.

    -=- James Mastros

Reply via email to