What character set are you using? None of the common ASCII-based
character sets (WIndows-1252, ISO-Latin-xxx, Unicode, ...) has a newline
character. See also below.
No matter \n,
10, 13, I just don't know why some newlines are printed. As the file is
generated by another program, I cannot see the source code, and manual
inspection does not discover any abnormalty.
[...]
Your program is missing a semicolon on line 42.
line 42????????
Apparently you've never read The Hitchhikers Guide through the Galaxy.
Long form: how do you propose us to fix your code without seeing it?
Have you seen the posting guidelines that are posted here twice a week?
Well I've tried :
chop $identiy;
This will remove the last character of $identiy.
How do you know that last character is actually the newline?
This will remove a trailing $/ from $identiy, whatever $/ may be set to
on your system (usually "\n").
Did you check that $/ matches the tail of $identiy?
This looks identical to the first line?
This is working on $identity instead of $identiy. Is that what you meant
to do?
One common problem are format incompatibilities between Windows, Mac,
and Unix. They use different characters/character combinations to denote
a line break. Therefore you should be very explicit about if you are
talking about a line feed character(LF), a carriage return
character(CR), or a logical newline entity of your OS.
Aside of that I suspect that you are looking at the wrong spot and your
real problem is somewhere else, like e.g. a misspelled variable name as
above
As strongly suggested in the posting guidelines please post a
self-contained, minimal program that demonstrates your problem, in your
case including some sample input data, preferable as a _DATA_ section.
jue