- or download this
sub printString {
my ($str) = @_;
print $str;
}
- or download this
printString("Hello world\n");
- or download this
if ($num == 1) {
sub1();
} elsif ($num == 2) {
sub2();
} ...
- or download this
use strict;
use warnings;
...
sub sub1 {
print "Handling case 1\n";
}