I know this must be really easy, but i can't get it to work
I've got a perl script, with a file.
I want to print an empty line, and the following doesn't seem to work:
print nameoffile "\n"
thanks for your help!!
I know this must be really easy, but i can't get it to work
I've got a perl script, with a file.
I want to print an empty line, and the following doesn't seem to work:
print nameoffile "\n"
thanks for your help!!
open FILE, ">>/some/file" || die 'Cannot open file for writing';
print FILE "\n";
close FILE;
thanks, that works, but it doen't when i open a file this way
open(FHConfi,"+< $CONFDIR/minstalador.conf");
(+< means:: +>$file&path Read, Write, Create, overwrites rather then appending.)
How could i write an empty line then??
thanks
use Fcntl ':seek';
seek(FILE, 0, SEEK_END);
before the print() to append.