#!/usr/bin/env perl use v5.8.7; use strict; use warnings; print "Hello world\n"; print 42, "\n";
run it by typing perl hello_world.pl
On unix you can also make it executable: chmod u+x hello_world.pl and then run like: ./hello_world.pl
A couple of notes
- Strings and numbers
- Strings must be quoted, you can use special characters such as "\n"
- The print statement (Output) - gets comma delimitered list of things
- ; after every statement