in reply to Testing for a string value within an array

Hashes are your friends! Perl programs often use them for precisely what you want to do. Just do this

$mounts{ "$directory/$entry" }++;
or this
$mounts{ "$directory/$entry" } = 1;
And when you're ready to retrieve the entries:
my @mounts = keys %mounts;

the lowliest monk