if (-e "some_file") { # do your thing }