Help for this page

Select Code to Download


  1. or download this
    use 5.14.0;
    use warnings;
    ...
    my $list = [qw< one two three four >];
    say my_splice_like_func($list, 2);      # want "three four"; get "two 
    +three four"
    say my_splice_like_func($list, 2, -1);  # want "three"; get "three fou
    +r"
    
  2. or download this
        if (@args == 0)
        {   
    ...
            die("too many args");
        }
    }