On Wed, 2002-08-28 at 03:23, Trey Harris wrote:
> Note--no parens around $field. We're not "capturing" here, not in the
> Perl 5 sense, anyway.
>
> When a pattern consisting of only a named rule invokation (possibly
> quantified) matches, it returns the result object, which in boolean
> context returns true, but in string context returns the entire captured
> text from the named rule (so, one hopes that the C<shellword> rule
> captures only the quoted text, not the quotes surrounding it).
Ok, just to be certain:
$_ = "0";
my $zilch = /0/ || 1;
Is $zilch C<"0"> or 8?
If C<"0">, does it continue to be "true"? What about:
$_ = "0";
my $zilch = /0/ || 1;
die "Failed to match zero" unless $zilch;
Is that a bug?