find ( thats exported by File::Find ) requires you to define a function that will be used to pick files that you are want. Basic usage like so:
use strict ; use warnings ; use File::Find; use Data::Dump; my $dir = shift || die "Dir name missing as argument\n"; my @files = (); find( \&wanted, "$dir" ); dd( \@files ) ; exit() ; sub wanted() { push @files, $File::Find::name if(/\.txt$/i); # .txt or whatever. }
In reply to Re: Using File::Find
by tmharish
in thread Using File::Find
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |