if (-e "/path/to/file") { # do something here; }