[wellylug] Command Line Carriage Return Question

David Antliff dave.antliff at paradise.net.nz
Mon May 3 14:03:35 NZST 2004

On Mon, 3 May 2004, Chris Hodgetts wrote:

> I have tried entering the \r and \n and everything else I can think of
> to get carriage returns into the message but to no avil.
> How I am invoking the script is
> ./jabber.pl jabbername at jabber.server "Testing \n Does this work \r I
> hope so"
> Someone suggested that I insert the ASCII CR (0x0A) which may work,
> however I have never inserted anything like this before

'carriage return' is \r - which you've already tried? Perhaps a
combination of newline + carriage return might work? "\r\n" or "\n\r" as a
last resort.

BTW in perl you can enter an arbirary value (like 0x0A which is decimal
10, or octal 012) by specifying the OCTAL value in a string thusly:
"\012"  - the leading zero isn't required but it's good practise to put it
in so it 'looks' octal.

Hope this helps,


More information about the wellylug mailing list