this is a safer test. installing then removing perl, for instance, could have tripped up the -f check