dakkar has asked for the wisdom of the Perl Monks concerning the following question:
I tried the following code:
print "Yes\n" if "0" =~ /0/; print ("0" =~ /0/); print "\n";
In Perl5 it prints:
Yes 1
as I expected. In Perl6 it prints:
Yes, just an empty line.
If I change all the 0s to 1s, it prints:
Yes
What is the match returning?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl6 pattern match return value
by Elian (Parson) on Oct 06, 2002 at 15:54 UTC | |
|
Re: Perl6 pattern match return value
by kelan (Deacon) on Oct 06, 2002 at 15:31 UTC |