File::Find::Rule uses opendir/readdir/closedir so that you don't have do -- work is for suckers
This program tested
#!/usr/bin/perl -- use strict; use warnings; use Path::Tiny qw/ cwd path /; use File::Find::Rule qw/ find rule /; path( "firstgonertoday/a.pl" )->touchpath; path( "firstgonertoday/me/too/b.pl" )->touchpath; rule( file => name => qr/\.pl$/i, exec => sub { print "@_\n"; return !!0; ## discard }, )->in( "firstgonertoday" ); path( "firstgonertoday" )->remove_tree; __END__ $ perl pathclassfilefindrulefirstgonertoday.pl a.pl firstgonertoday firstgonertoday/a.pl b.pl firstgonertoday/me/too firstgonertoday/me/too/b.pl
In reply to Re^4: Use Of Glob On File Extensions (find/rule)
by Anonymous Monk
in thread Use Of Glob On File Extensions
by NewToPerl777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |