R
riderchap
I am opening a new file and writing something to that file and then
closing it. Now note down the size of file, let it be n bytes.
Then when I open the newly created file using vi make a change undo
that change and save and close it, now see the size of the file is n+1
bytes.
Also when I open the Perl program generated file in vi, vi will say
"Last line is not complete", why is that? After the
change-undo-save-close by vi, when I reopen the file in vi the vi is
not saying "Last line is not complete".
Here is the sample test script I used.
open (OUT_FILE, ">testfile");
print OUT_FILE "Hello World";
close (OUT_FILE);
After Perl program run the size of file is 11bytes. (Hello World is 11
characters). After opening in vi insert a charater then delete that
character then save and close. Now the file size is showing as 12
bytes.
What is vi writing there?
Or what character is my Perl program missing to write?
Why vi says "Last line is not complete", when opening the file created
by the Perl program?
Thanks!!!!!!!
Kannan
Note: The file I create through my Perl program has to be used by
another C program and that C program is not reading the last line of
the file correctly. Please help.
closing it. Now note down the size of file, let it be n bytes.
Then when I open the newly created file using vi make a change undo
that change and save and close it, now see the size of the file is n+1
bytes.
Also when I open the Perl program generated file in vi, vi will say
"Last line is not complete", why is that? After the
change-undo-save-close by vi, when I reopen the file in vi the vi is
not saying "Last line is not complete".
Here is the sample test script I used.
open (OUT_FILE, ">testfile");
print OUT_FILE "Hello World";
close (OUT_FILE);
After Perl program run the size of file is 11bytes. (Hello World is 11
characters). After opening in vi insert a charater then delete that
character then save and close. Now the file size is showing as 12
bytes.
What is vi writing there?
Or what character is my Perl program missing to write?
Why vi says "Last line is not complete", when opening the file created
by the Perl program?
Thanks!!!!!!!
Kannan
Note: The file I create through my Perl program has to be used by
another C program and that C program is not reading the last line of
the file correctly. Please help.