use Tie::Filesytem; tie %root, Tie::Filesystem; print "Perl Found!" if exists $root{usr}->{bin}{perl};