V
Vic
I have a c program which writes mac address entries onto a text file.
Text file when opened in vim looks like this
index mac
1 ^@^@^Q^@^@^A ascii of (00.00.11.00.00.01)
2 ^@^@^Q^@^@^B ascii of (00.00.11.00.00.02)
.. ........
Likewise
I read the mac entries from the text file using a perl script and do
some processing
The problem occurs when i have a mac entry with last octet 0x0A, the
entry looks like this
idx ^@^@^Q^@^@ ascii of (00.00.11.00.00.0A)
This happens because ascii for 0x0A ('^J') is line feed for Unix text
editors. Hence the mac read using perl script is incorrect.
Can i get a solution for this so as to
1) Avoid a new line in text file
2) Get correct value(0x0A) read in the perl script
Thanks in advance
V
Text file when opened in vim looks like this
index mac
1 ^@^@^Q^@^@^A ascii of (00.00.11.00.00.01)
2 ^@^@^Q^@^@^B ascii of (00.00.11.00.00.02)
.. ........
Likewise
I read the mac entries from the text file using a perl script and do
some processing
The problem occurs when i have a mac entry with last octet 0x0A, the
entry looks like this
idx ^@^@^Q^@^@ ascii of (00.00.11.00.00.0A)
This happens because ascii for 0x0A ('^J') is line feed for Unix text
editors. Hence the mac read using perl script is incorrect.
Can i get a solution for this so as to
1) Avoid a new line in text file
2) Get correct value(0x0A) read in the perl script
Thanks in advance
V