#! /usr/bin/perl # use strict; use warnings; use File::Find; foreach (glob('*.txt')) { print "Found $_ using glob\n"; } find(\&wanted, '.'); sub wanted { return unless /\S+\.txt/i; print "Found $_ using File::Find\n"; #Do something with $_ }
In reply to Re: Looping the files in directory to combine with a common file
by inman
in thread Looping the files in directory to combine with a common file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |