How about:
 
#########################
 
use strict;
use warnings;
open(INFILE,"the_file") || die "Could not open \"the_file\" for reading!\n";
#...do something with the file
 
#########################
 

        -----Original Message----- 
        From: perlwannabe [mailto:[EMAIL PROTECTED] 
        Sent: Mon 1/19/2004 8:25 PM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: Terminating script if file does not exist
        
        

        Basically the script runs and looks for a file in a certain directory.  If
        the file is there, the script continues to run and process the file, but
        if the file is not there the script should just exit.
        
        Any ideas on how to do this?
        
        

Reply via email to