Help for this page

Select Code to Download


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