This is because you're viewing the output in a web-browser. If you look at the source code it sends to the browser, you'll see that it does actually say
Hello Hello Hello Hello Hello But the browser doesn't care about that, it's reading the HTML, so it needs a <BR> to create a line break. So do: for (1..5) {print qq'Hello<BR>';} Hope this helps. Carl ---------- >From: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: "\n" in Perl >Date: Wed, Dec 5, 2001, 11:04 am > > Hi to All, > I' d like to know why, when I use a cgi script under Win95, the browser > doesn't print in output the carriage-return "\n". > An example: this is my simple cgi script: > > print qq' > <HTML> > <HEAD><TITLE>Perl Page</TITLE></HEAD> > <BODY BGCOLOR = "FFFFCC">'; > for (1..5) {print qq'Hello\n';} > print qq'</BODY></HTML>'; > > In output I see the word "Hello" repeated 5 times in a same line. Instead > of using the char "\n", is it possible to use some combination of Ascii > code? > > Thanks a lot in advance !! > Angelo > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]