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
|
|
| Resolved | Were you able to locate the answer to your questions? |
|
|