Ah! Ok, yes, I had missed that. Thanks, this is exactly what I wanted.
Dave
On Mon, 5 Aug 2002, Stephen Rawls wrote:
> >> Doesn't the :w option do that?
> >> :w/one two/ translates to /one \s+ two/
>
> >Not exactly. The regex you showed would match any of these (using
> underscores for
>
From: "Damian Conway" <[EMAIL PROTECTED]>
> > what would "true" (the string) be converted to?
>
> In a numeric context: 0 (as in Perl 5).
which was my point. You wouldn't want to cast any ol' scalar as a
number just to get 1 or 0 representations or TRUE or FALSE... that wouldn't
DWIM.
--- Dave Storrs <[EMAIL PROTECTED]> wrote:
> Actually, this is one thing that has troubled me
> about the new regex rules, and I've mentioned it
> before. I would still like for there to be
> a "reverse /x" switch, that would tell the
> regex that I want it to treat whitespace
> literally
Doe
Uri Guttman wrote:
> but remember that whitespace is ignored as the /x mode is on
> all the time.
Whoops, yeah. For some reason I kept literal mode on when
reading the spaces between two literals.
The rules {foo bar} and {foobar} are the same, but some
very low level part of my brain is resisti
> "KF" == Ken Fox <[EMAIL PROTECTED]> writes:
> Dave Storrs wrote:
>> why didn't you have to write:
>>
>> rule ugly_c_comment {
>> /
>> \/ \* [ .*? ? ]*? \* \/
>> { let $0 := " " }
>> /
>> }
> Think of the curly braces as the regex quotes. If "{" is the quote
> then
On Sat, 3 Aug 2002, Ken Fox wrote:
> Dave Storrs wrote:
> > why didn't you have to write:
> >
> >rule ugly_c_comment {
> >
> /
> >
> \/ \* [ .*? ? ]*? \* \/
> >
> { let $0 := " " }
> >
> /
> >}
>
> Think of the curly braces as the regex q
Dave Storrs wrote:
> why didn't you have to write:
>
> rule ugly_c_comment {
>
/
>
\/ \* [ .*? ? ]*? \* \/
>
{ let $0 := " " }
>
/
> }
Think of the curly braces as the regex quotes. If "{" is the quote
then there's nothing spe
On Sat, 3 Aug 2002, Damian Conway wrote:
> > don't know exactly what the syntax for adding /* */ will be
>
> Something like this:
>
> grammar Perl::With::Ugly::C::Comments is Perl {
>
> rule ws { | }
>
> rule ugly_c_comment {
> /\* [ .*
Miko O'Sullivan wrote:
> OK, would that notation ( @arr[] = $var ) be something that could be added
> by a module, in the same way that operators and /* */ will be addable? I
> don't know exactly what the syntax for adding /* */ will be
Something like this:
grammar Perl::With::Ugly::C:
At 8:53 AM -0400 8/2/02, Trey Harris wrote:
>(With the possible exception of modules that disobey the laws of physics,
>but I'm not putting anything past Larry... no strict 'physics' ;)
Yeek! Hopefully Larry'll forbear--while he may be able to pull that
one off, I'm afraid I'm not up to the task
On Fri, 2 Aug 2002, Nicholas Clark wrote:
: On Fri, Aug 02, 2002 at 08:53:51AM -0400, Trey Harris wrote:
: > (With the possible exception of modules that disobey the laws of physics,
: > but I'm not putting anything past Larry... no strict 'physics' ;)
:
: Yay!
:
: $ cat infinite_compression.pl
On Fri, Aug 02, 2002 at 08:53:51AM -0400, Trey Harris wrote:
> You've often asked this list, "will doing X in a module be possible?"
> Consider the things that Damian's already done with modules in Perl 5. I
> think Damian's involvement in Perl 6 if nothing else will insure that, no
> matter what
In a message dated Fri, 2 Aug 2002, Miko O'Sullivan writes:
> OK, would that notation ( @arr[] = $var ) be something that could be added
> by a module, in the same way that operators and /* */ will be addable?
I don't think we've seen too much about how Larry plans to do
Perl-munging-Perl except
> > - There's already a huge population of programmers out there who already
use
> > this notation. I frankly admit that I think of PHP as a great idea that
> > wasn't done quite right.
>
> I agree. Including that notation! ;-)
Touche. Darn it's difficult disagreeing with pithy people. :-)
OK
Miko O'Sullivan aksed:
> what would "true" (the string) be converted to?
In a numeric context: 0 (as in Perl 5).
> Here's my point more
> explicitly: in a boolean context, there's no need to get any specific string
> (0, 1, "yup") as long as it correctly expresses true or false. It's whe
From: "Dave Mitchell" <[EMAIL PROTECTED]>
> But perl5 already does this:
Dave gets the "First to Point Out the Feature Exists" award. I knew that
out of three ideas I'd be lucky if just one of them was actually a new
feature idea.
I might still say that the parens don't make things quite obvio
16 matches
Mail list logo