Difference between revisions of "2. Print 'Hello World!'"
From Biolecture.org
imported>SeoGaLam (Created page with "<pre> # Prints the message using two different delimeters. print "Hello, world!\n"; print qq=Did you say "Hello?"\n=;</pre>") |
imported>SeoGaLam |
||
Line 1: | Line 1: | ||
+ | <p>Save a file called hello.pl with this one line:</p> | ||
+ | |||
<pre> | <pre> | ||
− | + | <strong>print "Hello World\n";</strong></pre> | |
− | print "Hello | + | |
− | + | <p>Make sure the Perl executable is on your path.</p> | |
+ | |||
+ | <p>Now type the following command at your command prompt:</p> | ||
+ | |||
+ | <pre> | ||
+ | <strong>perl hello.pl</strong></pre> | ||
+ | |||
+ | <p>If everything's OK, you should get the following output:</p> | ||
+ | |||
+ | <pre> | ||
+ | <strong>Hello World</strong></pre> | ||
+ | |||
+ | <p>If not, troubleshoot.</p> | ||
+ | |||
+ | <p> </p> | ||
+ | |||
+ | <p><span style="font-size:18px"><strong>Reference</strong></span></p> | ||
+ | |||
+ | <hr /> | ||
+ | <p>1. <a href="http://www.troubleshooters.com/codecorn/littperl/perlhelo.htm">"http://www.troubleshooters.com/codecorn/littperl/perlhelo.htm"</a></p> |
Latest revision as of 01:36, 7 December 2018
Save a file called hello.pl with this one line:
<strong>print "Hello World\n";</strong>
Make sure the Perl executable is on your path.
Now type the following command at your command prompt:
<strong>perl hello.pl</strong>
If everything's OK, you should get the following output:
<strong>Hello World</strong>
If not, troubleshoot.
Reference
1. "http://www.troubleshooters.com/codecorn/littperl/perlhelo.htm"