Hello Good people,
I am running a script. This checks if a file does not and then tries to create a file and then write to the file. For some reason the code doesnt work.
Here is a sample.
if (!-e "$log"){ open(CREATE, "+>>$log") or die "$log failed: $!\n"; while (<CREATE>){ foreach $ser(@ser) { printf "%3s",$ser; } print "\n"; } close (CREATE); # WHAT AM I DOING WRONMG HERE?? }
20040614 Edit by Corion: Added formatting, added comment before WHAT AM I ...
In reply to file creating AND writing error by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |