Help for this page

Select Code to Download


  1. or download this
    sub foo {
      my ($a) = qw(first second third);
    ...
    
    printf "in scalar context: %s\n", scalar foo();
    printf "in list context: %s\n", join ',', foo();
    
  2. or download this
    in scalar context: 3
    in list context: first