Wednesday, April 13, 2011

Printing all the files that have both ".rtf" and ".ftp"

use warnings;
use strict;
use File::Find::Rule;
use Data::Dumper;

my @files = File::Find::Rule->file()
                            ->name( '*.rtf', '*.ftp' )
                            ->in( './' );
print Dumper(\@files);

No comments: