Hi John,


Moon, John wrote:
Does anyone know the octal code for what vi is showing as "^L"? I tried
"\n\r" & \r\n" but that does not seem to be the same... I am on a UNIX
box... I need the octal code to add to the beginning of first record
written from my perl script... I'm using "write" and "format" and need
ALL headers to be alike... the first is w/out the "^L"...


Sorry, no idea, but you can see the ascii table with "man ascii".

So, are you saying this character is already in a file and you want to try to match it? Can you isolate the character? If you can isolate it with head/tail, then you can use "od" to get the code. i.e.,to get the octal code of the last character in the first line:

head -n 1 <file> | tail -c 1 | od -b

Check the man pages to make sure I got it right. Of course, if you don't have a ^L to work with and want to make one, I wouldn't know the code. Sorry!

Ray




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to