Yeah, you probably want
my ($x, $y, $z) = @shift;
For reference:
Valid is either
sub () { my ($x, $y, $z) = @_;
sub ($x, $y, $z) {
For reference:
Valid is either
or