# folder where the HTML-files (that need to be parsed are stored my $html_dir = '/path/to/dir/with/html.files'; # fetch all.html-files from the directory my @html_files = File::Find::Rule->file->name( '*.html')->in( $html_dir); for my $file ( @html_files ) { # parse the files # store all results that you got from the HTML-files in only one txt-file. }