Reputation: 31
I got a file output from my perl script.
When I use less to open it less output
it looks like this:
ABCDEFG^\HIJKLMN
When I use cat or head to open it head output
it looks like this
ABCDEFGHIJKLMN
So I want to ask what is the ^\
symbol?
Upvotes: 2
Views: 1426
Reputation: 123480
This representation is known as "caret notation" and is one notation used by some tools and editors to show undrawable control characters.
^\
in particular represents the ASCII file separator character, aka "FS" or 0x1C.
You can determine this manually by taking the ASCII value of the backslash (0x5C) and substracting 0x40, giving 0x1C. Should you want to input it in a terminal, you can press Ctrl+\.
This character is not used in any meaningful sense today. How it got into your perl script output is anyone's guess.
Upvotes: 2