#!/usr/bin/perl -w for( my $i='a'; $i lt 'z'; $i++ ) { if ( -e "$i:/" ) { print "Drive $i exists\n"; } }