Mega Code Archive

 
Categories / Perl / Language Basics
 

Print function prints a string or a list of comma-separated words to the Perl filehandle STDOUT

If successful, the print function returns 1; if not, it returns 0. The string literal \n adds a newline to the end of the string.  To interpret backslashes, Perl requires that escape sequences like \n be enclosed in double quotes. print "Hello", "world", "\n"; print "Hello world\n";