Ad space (banner)
Lesson 2 / 20

Your first output (print)

This lesson covers the basics of printing in Perl with print.

print "..."; displays text on the screen. Perl is strong at regular expressions and text handling, and has been used for log analysis and system administration for decades.

The sample code prints a string with the single line print "Hello, Perl!\n";. The \n is the special character for a line break.

A common early stumble is forgetting the semicolon ; at the end of the line. A Perl statement has to end in a semicolon, and leaving it out is an error.

In professional work, Perl is still doing real jobs wherever large volumes of text need processing quickly — analysing log files, running text-transformation batches.

๐Ÿ“– Reference code
โœ๏ธ Your code
Type your code, then press "Run"

๐Ÿงช This site can't compile or run Perl directly, so it checks on the spot whether what you typed matches the reference code (scoring happens entirely in your browser โ€” nothing is sent anywhere).

Ad space (banner)
Ad space (in-article)