Help for this page
# Assuming $path contains the full pathname of the file/directory if (-d $path) { ... } elsif (-f $path) { # It's an existing file }