Rory Oconnor wrote:
>
> I need to touch a file with a "1" in it if a condition is true, and
> either toggle the "1" to a "0" or delete the file (whichever is better,
> probably toggle) if another condition is true. Excuse my
> newbie-ness...but can anyone give me some hints as to the correct syn
Hi Rory,
Assuming that if there is a problem in opening the file then it's 0, I
hope the following code helps.
#Code Begings
if (open (INFILE, ";
close (INFILE);
} else {
$flag = 0;
}
if ($flag == 0) {
$flag = 1;
} else {
$flag = 0;
}
open (OUTFILE, ">file.txt") || die;
pr