in reply to Re: How do I search for a specific directory on a remote PC?
in thread How do I search for a specific directory on a remote PC?

Regexes are overkill for case insensitive comparisons... how about:
if (lc $_ eq lc $file and -f $_)
for speed, clarity and correctness... (your regex has issues with special chars and trailing newlines...)

-Blake