http://www.perlmonks.org?node_id=1033888


in reply to Q regarding glob

use feature 'say'; use Cwd; my $origdir = cwd(); chdir '../../dir1/dir2'; for my $element( glob '*/dir3/filename' ) { say $element; }

Alternately, can you do ...?

my $suffix = '/dir3/filename'; for my $element( glob '*' ) { say $element . $suffix; }

As Occam said: Entia non sunt multiplicanda praeter necessitatem.