Hi folks,

Thanks for all the replies, I've now finished the script.

Nathan.


-----Original Message-----
From: Nathan Mattick 
Sent: Friday, July 19, 2002 2:38 PM
To: [EMAIL PROTECTED]
Subject: Q: Basic file operations...


Could someone please help, how do I:

[1] test whether a file exists before I open?

If I use:
OPEN(LOGFILE, "file.log") or die "OPEN() failed: $!";

.... I know it failed, but I don't want to 'die', just gracefully terminate
the script.

[2] invoke Unix command 'rm' (or any other system command) to delete a file

I've opened a file, process it, then want to delete it.

Thanks in advance,
Nat.

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

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

Reply via email to