I'm new to PERL and I'm having some trouble getting a parent folder of a known sub-folder(s).
So I have a list of subfolders, let's say A, B, C, D, etc.
I know they are all scattered around in folders labeled (for eg.), 1, 2, 3, 4, etc.
So it can be like this:
I just want to iterate through each folder and find it's direct parent directory. Any ideas?
use File::Find::Rule qw( ); my @matches = File::Find::Rule ->name(qw( A B C D )) ->dir ->in('.');