Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-27 Thread Nathan Wiger
Nathan Torkington wrote: > > Hmm. This is exactly the same situation as with chomp() and somehow > chomp() can tell the difference between: > > $_ = "hi\n"; > chomp; > > and > > @strings = (); > chomp @strings; Good point. I was looking at it from the general "What's wrong with how @

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-27 Thread Nathan Torkington
Nathan Wiger writes: > Honestly, not sure. Although, there are two things I'd say about it: > >1. I don't think it's a showstopper for this RFC, since the > feature you are addressing is actually a new piece of > functionality. Hmm. This is exactly the same situation as with cho

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-27 Thread Nathan Wiger
Nathan Torkington wrote: > > When I was thinking about this very topic yesterday and today, I > came up with this problem: > > @strs = (); > match /pat/, @strs; # surprise! I'm matching on $_ > > That is, how do you tell an empty array from no arguments? Easy: We'll just use lazy evalua

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-27 Thread Nathan Torkington
Perl6 RFC Librarian writes: >match; # all defaults (pattern is /\w+/?) >match /pat/;# match $_ >match /pat/, $str; # match $str >match /pat/, @strs; # match any of @strs When I was thinking about this very topic yesterday and today, I came up

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-27 Thread Nathan Wiger
> =head1 TITLE > > Replace =~, !~, m//, and s/// with match() and subst() In a marked oversight, I'd also like to note that tr// would be replaced with trade: Perl 5 Perl 6 --- -- $str =~ tr/a/b/;$new =

Re: RFC 110 (v2) counting matches

2000-08-27 Thread Bart Lateur
On 27 Aug 2000 19:01:45 -, Perl6 RFC Librarian wrote: >m//g just returns 1 for matching. Er... but in a scalar context, m//g DOES only match once! If you want more, repeat the match. Or use it in a list context, then it will try to match them all. $_ = "abaabbbababbbabbaaa";

RFC 166 (v1) Additions to regexs

2000-08-27 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Additions to regexs =head1 VERSION Maintainer: Richard Proctor <[EMAIL PROTECTED]> Date: 27 Aug 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 166 =head1 A

RFC 165 (v1) Allow Varibles in tr///

2000-08-27 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Allow Varibles in tr/// =head1 VERSION Maintainer: Richard Proctor <[EMAIL PROTECTED]> Date: 27 Aug 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 165 =hea

RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-27 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Replace =~, !~, m//, and s/// with match() and subst() =head1 VERSION Maintainer: Nathan Wiger <[EMAIL PROTECTED]> Date: 27 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 164 =h

RFC 144 (v2) Behavior of empty regex should be simple

2000-08-27 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Behavior of empty regex should be simple =head1 VERSION Maintainer: Mark Dominus <[EMAIL PROTECTED]> Date: 24 August 2000 Last Modified: 27 August 2000 Version: 2 Mailing List: [EMAIL PROTECTED]

Re: RFC 112 (v2) Assignment within a regex

2000-08-27 Thread Nathan Wiger
>if (/Time: (..):(..):(..)/) { > $hours = $1; > $minutes = $2; > $seconds = $3; > } > > This then becomes: > > /Time: (?$hours=..):(?$minutes=..):(?$seconds=..)/ > > This is more maintainable than counting the brackets and easier to understand > for a complex r

RFC 110 (v2) counting matches

2000-08-27 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE counting matches =head1 VERSION Maintainer: Richard Proctor <[EMAIL PROTECTED]> Date: 16 Aug 2000 Last Modified: 27 Aug 2000 Version: 2 Mailing List: [EMAIL PROTECTE

RFC 112 (v2) Assignment within a regex

2000-08-27 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Assignment within a regex =head1 VERSION Maintainer: Richard Proctor <[EMAIL PROTECTED]> Date: 16 Aug 2000 Date: 27 Aug 2000 Version: 2 Mailing List: [EMAIL PROTECTE