Hi all,

I want my perl code to be able to check to see if a file exist and if
the file doesn't exist I want that file to be created.  What would be my
best way of going about this?

Something like...

$backup_file = $conhash{$title}{'Linux Passwd Backup'}; #Grab location
from a directory located in a hash.

next if (exists($backup_file)) {}
else {
  open(BACKUP, ">backup_file") #Create file backup_file; 


#%conhash looks like this...

%conhash = (
                {
             Backup => /tmp/backup_file
            },
);

Can any one add or correct this?

Regards,

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to