http://qs1969.pair.com?node_id=1205054


in reply to [SOLVED]: Using glob in file test gives "Use of uninitialized value in -e" warning.

When I enable warnings on the command line, I get warnings :)
perl -wle 'print -e glob "/abc/def/ghi/test*"' Use of uninitialized value in -e at -e line 1. Use of uninitialized value in print at -e line 1.

Here is one way to do what you want:

if (glob '/abc/def/ghi/test*') { # sudo }