in reply to checking for existence of a file in perl

To perform a thorough check (for most cases):
# make sure $path is a plain file (not a dir or other type), is readab +le, and is executable if (-f $path && -r $path && -x $path)

Replies are listed 'Best First'.
Re^2: checking for existence of a file in perl
by eff_i_g (Curate) on Jan 13, 2009 at 20:20 UTC
    Per the docs, this is better written as:
    if (-f $path && -r _ && -x _)