you can use for example:
$file1='file1.inp'; $file1='file2.exe';
if (-e $file1 and -e $file2 ) {
print "All necessary files exists in Root Dir.\n\n";
}else{
print "****ATTENTION****\nNot all necessary files exists in Root Dir \($DirBase\)\nThe program will STOP!\n";
print "The necessary files to Run this program are:\n";
print "\t\t\t$file1\n\t\t\t$file2\n";
exit;
}
----- Original Message ----- From: "Samuel M. Chang" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 12, 2005 11:35 PM
Subject: Test a File If it exists
Is there a way to test if a specific file exists or not in PERL coding?
Regards,
Sam
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
