Solution: Hello World part 2 (what is the difference between comment and POD?) - video
First exercise, second part
Write a simple script that prints Hello world
print "hello world\n";
$ perl hello.pl
use strict; use warnings; print "hello world\n";
Add comments to your code
use strict; use warnings; print "hello world\n"; #comment # some comment
Add user documentation to your code
use strict; use warnings; print "hello world\n"; #comment # some comment =pod =head1 Title text =cut
$ perl hello.pl $ perldoc hello.pl
But that does not look really good and perldoc reported about some error too.
That's because POD requires empty rows around its tags:
use strict; use warnings; print "hello world\n"; #comment # some comment =pod =head1 Title text =cut
$ perldoc hello.pl $ pod2html hello.pl > hello.html $ lynx hello.html

Published on 2015-02-15
Comments
In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation. comments powered by Disqus
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.