use File::Find::Rule qw( ); my @files = File::Find::Rule ->name( qr/^\d{8}\.\d{6}\.host\d\.\d{1,6}$/ ) ->file() ->maxdepth(1) ->in( $path );
The advantage is that you get qualified file names.
It's cheaper to execute a regex match than to check if a file is a plain file, so I reversed the order of the tests.
In reply to Re: What's wrong with this grep?
by ikegami
in thread What's wrong with this grep?
by chanakya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |