Re: purge: opposite of grep

2002-12-04 Thread John Williams
On Wed, 4 Dec 2002, Miko O'Sullivan wrote: > > FWIW, I came up with "purge" because my first inclination was to spell > "grep" backwards: "perg". :-) While "purge" is cute, it certainly is not obvious what it does. Of course neither is "grep" unless you are an aging unix guru... How about somet

Re: seperate() and/or Array.cull

2002-12-04 Thread Luke Palmer
> Date: Wed, 4 Dec 2002 19:21:27 -0800 > From: Michael G Schwern <[EMAIL PROTECTED]> > > On Wed, Dec 04, 2002 at 08:08:48PM -0700, Luke Palmer wrote: > > About your idea, though, I'm rather indifferent. However, a friend of > > mine once asked me if Perl had "search" or "find" operation, returning

Re: seperate() and/or Array.cull

2002-12-04 Thread Michael G Schwern
On Wed, Dec 04, 2002 at 08:08:48PM -0700, Luke Palmer wrote: > About your idea, though, I'm rather indifferent. However, a friend of > mine once asked me if Perl had "search" or "find" operation, returning > the I of matching elements. Now am I just being braindead, or > is Perl actually missing

Re: seperate() and/or Array.cull

2002-12-04 Thread Luke Palmer
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Date: Wed, 4 Dec 2002 18:26:17 -0800 > From: Michael G Schwern <[EMAIL PROTECTED]> > Content-Disposition: inline > Sender: Michael G Schwern <[EMAIL PROTECTED]> > X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ > > (The post abou

RE: purge: opposite of grep

2002-12-04 Thread David Whipp
Miko O'Sullivan [mailto:[EMAIL PROTECTED]] wrote: > SUMMARY > > Proposal for the "purge" command as the opposite of "grep" in > the same way that "unless" is the opposite of "if". I like it. But reading it reminded me of another common thing I do with grep: partitioning a list into equivalence

seperate() and/or Array.cull

2002-12-04 Thread Michael G Schwern
(The post about 'purge' just made me remember this idea) Lets say you have a list of program arguments. @ARGV = ('foo', '--bar=baz', 'yar'); and you want to seperate that into two lists. One of switches and one of normal args. You can't just use a grep, you'd have to do this: my @swit

purge: opposite of grep

2002-12-04 Thread Miko O'Sullivan
SUMMARY Proposal for the "purge" command as the opposite of "grep" in the same way that "unless" is the opposite of "if". DETAILS I've lately been going a lot of greps in which I want to keep all the elements in an array that do *not* match some rule. For example, suppose I have a list of membe

RE: Usage of \[oxdb]

2002-12-04 Thread David Whipp
> I think that solves all the problems we're having. We change \c to > have more flexible meanings, with \0o, \0x, \0d, \0b, \o, \x as > shortcuts. Boom, we're done. Thanks! How far can we go with this \c thing? How about: print "\c[72, 101, 108, 108, 111]"; will that print "Hello"?

Re: Usage of \[oxdb]

2002-12-04 Thread Michael Lazzaro
On Wednesday, December 4, 2002, at 12:21 PM, Larry Wall wrote: I think the general form is: \0o33 - octal \0x1b - hex \0d123 - decimal \0b1001- binary \x and \o are then just shortcuts. The general form could be \0o[33] - octal \0x[1b] - hex

Re: Usage of \[oxdb] (was Re: String Literals, take 2)

2002-12-04 Thread Damian Conway
Larry wrote: : But I think we'd definitely like to introduce \d. Can't, unless we change \d to in regexen. Which we ought to be very wary of, given how very frequently it's used in regexes. Damian

Re: Usage of \[oxdb]

2002-12-04 Thread Michael Lazzaro
On Wednesday, December 4, 2002, at 11:50 AM, Dave Whipp wrote: ps. how did this thread migrate from p6d to p6l? By popular request. If we have something we think will be even remotely controversial, we'll move it to p6l for debate, then use p6d to summarize the outcome. That will concentra

Re: Usage of \[oxdb] (was Re: String Literals, take 2)

2002-12-04 Thread Larry Wall
On Wed, Dec 04, 2002 at 11:38:35AM -0800, Michael Lazzaro wrote: : We still need to verify whether we can have, in qq strings: : :\033 - octal (p5; deprecated but allowed in p6?) I think it's disallowed. :\o33 - octal (p5) :\x1b - hex (p5) :\d12

Re: Usage of \[oxdb] (was Re: String Literals, take 2)

2002-12-04 Thread Dave Whipp
"Michael Lazzaro" <[EMAIL PROTECTED]> wrote > Note that \b conflicts with backspace. I'd rather keep backspace than > binary, personally; I have yet to feel the need to call out a char in > binary. :-) Or we can make it dependent on the trailing digits, or > require the brackets, or require back

Usage of \[oxdb] (was Re: String Literals, take 2)

2002-12-04 Thread Michael Lazzaro
We still need to verify whether we can have, in qq strings: \033 - octal (p5; deprecated but allowed in p6?) \o33 - octal (p5) \x1b - hex (p5) \d123 - decimal (?) \b1001- binary (?) and if so, if these are allowed too: \o{777}

Re: String Literals, take 2

2002-12-04 Thread Larry Wall
It's o, not c. Larry

Re: String Literals, take 2

2002-12-04 Thread Luke Palmer
> Date: Tue, 03 Dec 2002 18:39:27 -0500 > From: James Mastros <[EMAIL PROTECTED]> > > Huh? In that case, somebody should tell Angel Faus; "Numeric literals, > take 3" says 0c777, and nobody disented. IIRC, in fact, nobody's > descented to 0c777 since it was first suggested. Well, except Larry.

Re: String Literals, take 2

2002-12-04 Thread James Mastros
On 12/03/2002 2:27 PM, Michael Lazzaro wrote: I think we've been gravitating to a "language reference", geared primarily towards intermediate/advanced users. Something much more rigorous than beginners would be comfortable with (since it defines things in much greater detail than beginners wou