At 11:48 AM 9/3/00 +1100, Damian Conway wrote:
Ever consider then having
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines?
I think this is a superb idea, and look forward to someone's RFC'ing it.
I like it too. Anyone working on the RFC?
I
Peter Scott writes:
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines?
I think this is a superb idea, and look forward to someone's RFC'ing it.
Should be part of the want() context. Permit operations to discover
(as does split) how many elements
At 10:52 AM 9/4/00 -0600, Nathan Torkington wrote:
Peter Scott writes:
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines?
I think this is a superb idea, and look forward to someone's RFC'ing it.
Should be part of the want() context.
It is. I
Nathan Wiger wrote:
Tom Christiansen wrote:
Ever consider then having
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines? I mean, how many if any builtins would it
make sense to make aware of this, and do something "different"?
Personally, I think this would
Should be part of the want() context.
It is. I interpreted Damian's remark to mean that it would be good if
readline() took advantage of it, and that should be RFC'ed.
That's indeed precisely what I meant. In fact, all list-returning built-ins
ought to be optimized this way.
Tom Christiansen wrote:
Well, it only does this if it's not something like 'split', then!
Yes, it does "do it" with split. split is defined to do what it
does, how it does it. *This* is the kind of senseless harping that
annoys me, Nathan.
H. I'm apparently not making myself clear
In message [EMAIL PROTECTED]
Nathan Wiger [EMAIL PROTECTED] wrote:
For example, in Perl you have for a long time been able to do this:
($one, $two) = grep /$pat/, @data;
However, what currently happens is grep goes to completion, then
discards possibly huge amounts of data
Here is my suggestion: What if other functions were able to backtrace
context and determine how many arguments to return just like split can?
I have an RFC on that:
RFC 21: Replace Cwantarray with a generic Cwant function
Cwant takes a list of strings that describe
Ever consider then having
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines?
I think this is a superb idea, and look forward to someone's RFC'ing it.
Damian
Let me shift gears and instead ask whether anyone thinks this:
$y = ($first, $second) = grep /$pat/, @data;
Returning "5" has any value? If you're going to do this, it seems like
you'd want the number that were really returned (since scalar grep
will give you the total number found
Well, it only does this if it's not something like 'split', then!
Yes, it does "do it" with split. split is defined to do what it
does, how it does it. *This* is the kind of senseless harping that
annoys me, Nathan.
So it's not 100% consistent.
Wrong: It's 100% consistent with the
11 matches
Mail list logo