Help for this page

Select Code to Download


  1. or download this
    sub serial {
        join(', ', @_[0 .. $#_-1])
    ...
        . (@_ > 1 ? ' and ' : '')
        . $_[-1];
    }
    
  2. or download this
    sub serial {
        my $last = pop;
    ...
        . (@_ > 0 ? ' and ' : '')
        . $last;
    }