in reply to shift, undef and 'or die'

Use the lvalue returned from the assignment, and test it for definedness:
sub foo { defined(my $x = shift) or warn "No parameter given!" # ... }
Of course, it still can't tell if the array was empty or if it shifted an undefined value off it.