in reply to search for folder

Hi, make it easy on yourself and use a tool built for the job:

perl -MPIR -wE 'chomp(my $wanted = <>); say for PIR->new->dir->name(qr +/$wanted/)->all("C:/")'
See Path::Iterator::Rule.

Hope this helps!


The way forward always starts with a minimal test.