David M. Lloyd:
# On Fri, 5 Oct 2001, Garrett Goebel wrote:
#
# > For those who aren't yet busy reading, you can find it at:
# > http://www.perl.com/pub/a/2001/10/03/exegesis3.html
#
# OK, I have a question.
#
# On page 3 you say:
#
# > Because the Perl 6 "diamond" operator can take an arbitrary
# expression
# > as its argument, it's possible to set a filehandle to read an entire
# > file and do the actual reading, all in a single statement:
# >
# >    my $rest = <$data.{fh}.irs(undef)>
#
# If the diamond operator can take an arbitrary expression, how is this
# properly parsed?
#
# my $line = < $some_counter_or_something > 1000 ?? $file1 :: $file2 >;
#
# Wouldn't the '>' comparison operator screw it up?  Or is it
# an arbitrary
# expression except that you can't use the greater-than
# operator?  Or is the
# parser that smart?
#
# Just curious...

Hmmph.  My guess is that you'd have to do something like <($counter >
1000 ?? $file1 :: $file2)> and the fact that there are open parens at
the first greater-than would be enough for the parser to figure it out.

--Brent Dax
[EMAIL PROTECTED]
Configure pumpking for Perl 6

They *will* pay for what they've done.

Reply via email to