HTML ingones line breaks and also will condense consecutive spaces down to a single space. You have two mainoptions to get 'newlines' in HTML - <pre> and <br>:
# first you must always print a header line or you will get a 500 erro +r print "Content-Type: text/html\n\n"; # now you can do this: print "<pre>\nLine1\nLine2\n$some_var\nLine4\n</pre>"; # which is the same as this but not as pretty # (here I demonstrate the qq operator as well as using literal \n in t +ext print qq| <pre> Line1 Line2 $some_var Line4 </pre>|; # alternatively you can use <br> (here is a demo of herpage notation a +s well) print <<HTML <p> Line1<br> Line2<br> $some_var<br> Line4 </p> HTML
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: \n won't work?!
by tachyon
in thread \n won't work?!
by iamrobj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |