Help for this page

Select Code to Download


  1. or download this
    my @x = qw(a b c);
    my @y = qw(d e);
    print scalar (@x, @y);       # prints "2" (number of elems in @y)
    
  2. or download this
    print scalar qw(a b c d e);  # prints "e" (last elem in list)
    
  3. or download this
    print scalar ((@x, @y)[0..@x+@y-1]);      # prints "e"
    print scalar sub {@_[0..$#_]}->(@x, @y);  # prints "e"