in reply to Re^2: Using regex in file glob ?
in thread Using regex in file glob ?
you? think? :)
@OP
I just noticed that https://perldoc.perl.org/functions/readdir has examples for exactly what I suggested: grepping files by regex.
And here a minimal example of mine to find all .pl files in the current dir (win flavor)
>perl -E"opendir my $dh, '.'; say join qq{\n}, grep{/\.pl$/} readdir($ +dh)" demo_lock_data.pl print_time.pl self_rename.pl uniq_time.pl wrapped_pl.pl
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using regex in file glob ?
by jdporter (Paladin) on May 03, 2021 at 21:19 UTC | |
by LanX (Saint) on May 03, 2021 at 21:54 UTC |