in reply to Directory listing

I think you should chomp your input from STDIN, the lineend is probably not part of the file name. Davido's suggestion of File::Find is certainly what you want, but I like glob when a piece of a file name is known, here are a couple of fragments to help.

use File::Find; sub ask { my $response; print @_; chomp($response = <STDIN>); $response; } my $searchbase = '/usr/local/farm/company/subcompany/'; our @files; our $whatWeWant = ask 'What corp are you looking for? '; find sub { -d and push @files, glob "$File::Find::name/*$whatWeWant*"; }, $searchbase; { local ($\,$,) = ($/, $/); print @files; }
Untested.

After Compline,
Zaxo