Help for this page

Select Code to Download


  1. or download this
    my @array = qw/this that the other/;
    local $, = ", ";
    print @array[1..$#array], "\n";
    __OUTPUT__
    that, the, other
    
  2. or download this
    my $last_item = (this, that, the, other)[-1];
    
  3. or download this
    my $list = [qw/this that the other/];
    local $, = ", ";
    print @{$list}[0..$#{$list}];