develooper Front page | perl.perl5.porters | Postings from January 2015

[perl #123691] Feature: A variation of glob() which uses regexps

Thread Previous
From:
James E Keenan via RT
Date:
January 30, 2015 02:41
Subject:
[perl #123691] Feature: A variation of glob() which uses regexps
Message ID:
rt-4.0.18-6352-1422585693-1737.123691-15-0@perl.org
On Thu Jan 29 08:24:12 2015, ikegami@adaelis.com wrote:
> On Thu, Jan 29, 2015 at 6:51 AM, James E Keenan via RT <
> perlbug-followup@perl.org> wrote:
> 
> > On Wed Jan 28 10:39:13 2015, porton@narod.ru wrote:
> > > I suggest to add to Perl core a routine similar to glob(), but
> > > using regexps instead of globs.
> >
> > But that functionality already exists, does it not?
> >
> > (untested)
> > #####
> > opendir my $DIR, 'some/directory' or die;
> > my @files = grep { m/some_pattern/ } readdir $DIR;
> > closedir or die;
> > #####
> >
> 
> glob is both a filtered file fetcher (glob('*.txt')) and string generator
> (glob('{a,b}')).
> 
> You covered the former. If he wants the latter, there's Regexp::Genex.

The consensus appears to be that there is no need for a change in the Perl 5 core functionality with respect to the issues raised in this ticket. Closing ticket.

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=123691

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About