PDA

View Full Version : Perl Format and carriage returns


Tejay
11-25-2002, 06:21 PM
How can I use carriage returns, ^M, in Perl format function?
Should I put it in the format itself, @<<<<<<^M? Or should it be apart of my text like:
my $text = "Hello^M";
@<<<<<<
$text
.
What's the difference between ^M (Ctrl M) and \cM?

Thanks.

Tejay
11-26-2002, 08:06 PM
"The remaining whitespace character, \r, forces the printing of a new line if allowed by the picture line."

I'm trying to put carriage returns in format, but they are being removed. How do I make a picture line allow a carriage return?