#! /usr/bin/perl -w while() { my $path = `find /partial/prefix/path -name "*$_*"`; ... } __END__ filepart1 filepart2 ... filepartN #### while() { chomp; ... }