Re: Nice-to-have class methods

2016-01-28 Thread Tom Browder
On Wed, Jan 27, 2016 at 7:09 AM, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: >> On 27 Jan 2016, at 14:00, Tom Browder <tom.brow...@gmail.com> wrote: >> >> Given so many handy methods for built-in classes, it would be nice to have a >> couple of more for some,

RE: Nice-to-have class methods

2016-01-28 Thread Paul Marquess
From: Tom Browder [mailto:tom.brow...@gmail.com] > > Given so many handy methods for built-in classes, it would be nice to have a > couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed > > IO::Handle.say (or

Re: Nice-to-have class methods

2016-01-27 Thread Tom Browder
On Wed, Jan 27, 2016 at 7:09 AM, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: >> On 27 Jan 2016, at 14:00, Tom Browder <tom.brow...@gmail.com> wrote: >> >> Given so many handy methods for built-in classes, it would be nice to have a >> couple of more for some,

Re: Nice-to-have class methods

2016-01-27 Thread H.Merijn Brand
> > On Wed, Jan 27, 2016 at 1:43 PM Peter Pentchev <r...@ringlet.net> wrote: > > > On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > > > Given so many handy methods for built-in classes, it would be nice to > > have > > > a couple

Re: Nice-to-have class methods

2016-01-27 Thread Tom Browder
On Wednesday, January 27, 2016, Peter Pentchev <r...@ringlet.net> wrote: > > On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > > Given so many handy methods for built-in classes, it would be nice to have > > a couple of more for some, for instance: > > &

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 02:14:17PM +, Philip Hazelden wrote: > On Wed, Jan 27, 2016 at 1:43 PM Peter Pentchev <r...@ringlet.net> wrote: > > > On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > > > Given so many handy methods for built-in classes, i

Re: Nice-to-have class methods

2016-01-27 Thread Philip Hazelden
, Tom Browder wrote: > > Given so many handy methods for built-in classes, it would be nice to > have > > a couple of more for some, for instance: > > > > IO:Path.stemname > > Like basename except any suffix is removed > > Hmm, this sounds like a nice idea on a fi

Nice-to-have class methods

2016-01-27 Thread Tom Browder
Given so many handy methods for built-in classes, it would be nice to have a couple of more for some, for instance: IO:Path.stemname Like basename except any suffix is removed IO::Handle.say (or println) Like print except with an added newline. Cheers! -Tom

Nice-to-have class methods

2016-01-27 Thread Tom Browder
Given so many handy methods for built-in classes, it would be nice to have a couple of more for some, for instance: IO:Path.stemname Like basename except any suffix is removed IO::Handle.say (or println) Like print except with an added newline. Cheers! -Tom

Re: Nice-to-have class methods

2016-01-27 Thread Elizabeth Mattijsen
> On 27 Jan 2016, at 14:00, Tom Browder <tom.brow...@gmail.com> wrote: > > Given so many handy methods for built-in classes, it would be nice to have a > couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed See

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > Given so many handy methods for built-in classes, it would be nice to have > a couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed Hmm, this sounds like a nice

Re: Nice-to-have class methods

2016-01-27 Thread Brandon Allbery
On Wed, Jan 27, 2016 at 9:50 AM, Peter Pentchev wrote: > Right, so that would probably mean that you need a function that removes > the *last* extension; that might indeed make sense, although it's > trivial to implement as a regular expression substitution (but also beware >

Another nice to have: make # less ambiguous

2001-07-24 Thread Steve Fink
On my wishlist is forbidding the use of # just about anywhere but as a comment starter and in strings or regular expressions. Not a big deal, but it would make it easier to write 90% correct perl syntax parsers. It's a pain dealing with q#not a comment# and m#still not# and s(even)#this#.

Re: Nice to have it

2000-08-28 Thread Bart Lateur
On Mon, 28 Aug 2000 14:43:08 -0400 (EDT), Eric Roode wrote: Damian Conway wrote: @hash{grep /^[^_]/} gives you the public values of %hash. And the advantage of that over @hash{ grep /^[^_]/, keys %hash } would be what? Brevity? What if I want those keys of %hash? Or both

Re: Nice to have it

2000-08-28 Thread Damian Conway
And the advantage of that over @hash{ grep /^[^_]/, keys %hash } would be what? Brevity? Yes. Damian

Re: Nice to have it

2000-08-28 Thread Eric Roode
Damian Conway wrote: I have a draft RFC that proposes that the LIST argument of a grep be optional in a hash slice, and default to the key list of the sliced hash. So: @hash{grep /^[^_]/} gives you the public values of %hash. And the advantage of that over @hash{ grep /^[^_]/,