Easiest way is probably to use File::Slurp.
Here's an untested example:
#!env perl use strict; use warnings; use File::Slurp qw/read_dir/; my $Dir_Prefix = '../../dir1/dir2'; my $File_Path = 'dir3/filename'; MAIN: { my @files = read_dir($Dir_Prefix); foreach my $file (@files) { -d $file or next; if (-e "$Dir_Prefix/$file/$File_Path") { print "$file\n"; } } }
Update:Updated from a File::Find example.
stephen
In reply to Re: Q regarding glob
by stephen
in thread Q regarding glob
by arunagiri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |