Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    sub foo($) {  #actual foo implementation
      print shift;
    }
    
  2. or download this
    sub foo($$);      #two scalar arguments
    foo $bar;         #error
    foo @bar;         #error
    foo $bar, $baz;   #ok
    foo $bar, @baz;   #no error, but does it do what you want?