Please help.
I need to check if a files exists in the root of c. I would like to use if else to control the response. I have tried to check the file and verify $!, but it seems to give me a problem. Can anyone help? #!/usr/bin/perl $sysname = `hostname`; $nsname = substr($sysname,0,5); $tname = "shop1"; $ttname = "shop2"; $syroot = "\\\\shop1\\c\\loadvast.txt"; if ($nsname eq $tname) { (`xcopy "d:\\loadvast.txt" "c:\\" /I`); } open TESTF, $syroot; if ($! eq "") { print "good"; if ($nsname eq $ttname) { close TESTF; (system 'erase "\\\\shop1\\c\\loadvast.txt"'); } } else { print "bad"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]