Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Newline

A character used to represent the end of a line of text and the beginning of a new line. In programming languages such as C, Java, and Perl the newline character is represented as '\n'. Below is an example of how the newline may be used in Perl.

 


#!/usr/bin/perl
# Print "Hello World!" and start a new line with \n
print "Hello World!\n";

#Locate and replace any newlines in the mydata variable
#and replace those newlines with a ** as the separator.
$mydata =~ s/\n/**/g;

 

Also see: CR, LF, Line, Programming definitions, White space

 

Index

Category:
Dictionary

Related Pages:
N - Definitions

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope