Help for this page

Select Code to Download


  1. or download this
    foreach my $value ('1', '2', '3') {
        print "Next value is $value\n";
    }
    
  2. or download this
    foreach ('1', '2', '3') {
        print "Next value is $_\n";
    }
    
  3. or download this
    sub do_something {
        my ($arg1, $arg2) = @_;
        printf "You passed arguments '%s' and '%s'\n", $arg1, $arg2;
    }