in reply to checking for existence of a file in perl

See -X for the -f operator, and see perlvar for $? resp. system.