sub li { shift; @_ ? ($#_, &li) : (); } print li qw(a b c d e f g); # prints -1-1-1-1-1-1