http://www.perlmonks.org?node_id=938701


in reply to -e on windows giving error

Reorder your letters to put 'A' at the end. This is an improvement, not a perfect solution; you will only get the pop-up if `extracted` is not found at all.
sub get_drive { for my $letter ( 'B' .. 'Q', 'A' ) { return "$letter:" if -e "$letter:/extracted"; } return; }