Re: Raku one-liners posted on Unix & Linux StackExchange
[email protected] (Sean McAfee) Sun, 25 May 2025 15:34:39 -0700
| Newsgroups | perl.perl6.users |
|---|---|
| Message-ID | <CANan03ZvOKupsOdqh1RF823NqHNvyiv+dfqjnDFA_8iwCKi3fw@mail.gmail.com> |
On Sun, May 25, 2025 at 12:32 PM Sean McAfee <[email protected]> wrote: > I'll have to play around with your code a bit. Normally I would use >> `.dir(test => /:i \.pdf / )` to pull out PDF files. >> > > Oh yeah, that's a bit better. I'm not as familiar with the path API as I > could be. > ...Huh. I was just messing around with the test parameter to dir and noticed something that seems to be a bug. If you call dir without any parameters, the special directories "." and ".." are not returned, as mentioned on this page <https://docs.raku.org/routine/dir>. But if you pass a test parameter, those directories are eligible to be returned. For example, dir(:test(/./)) returns ".".IO and "..".IO among its results. Does anyone know if this is the intended behavior? It doesn't really seem useful.