- sub
First sub
examples/firstperl/hello_world_main.pl
#!/usr/bin/env perl use v5.8.7; # use 5.008007; use strict; use warnings; sub main { print "Hello world\n"; print 42, "\n"; } main();
- Putting all your code in small(!) functions will make your code better.