sub f { my ($x,$y,@z) = @_; print "$x\n$y\n@z\n"; } f("first","second","third","fourth");