in reply to Re: Regex for files
in thread Regex for files

readdir is low level :) Path::Tiny is a whole nother level :P

use Path::Tiny qw/ path /; print "$_\n" for path('.')->children( qr /^messages(?:\.\d?)?$/ ) ;

Replies are listed 'Best First'.
Re^3: Regex for files (path::tiny)
by shmem (Chancellor) on Apr 23, 2015 at 12:16 UTC
    readdir is low level :) Path::Tiny is a whole nother level :P

    That may well be, but is irrelevant for Regex for files.


    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

      readdir is low level :) Path::Tiny is a whole nother level :P

      That may well be, but is irrelevant for Regex for files.

      In what way?

        In what way?

        See title. OP didn't ask for enhancement reading directories, but for a regex for files.

        perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'