in reply to What’s the best way to get the last N elements of a Perl array?

Note:If the array has less than N, I don't want a bunch of undefs in the return value.

Seems like you already tried something or at least thought about your task. Was there any outcome (a.k.a. code) that you can show us?

Regards,
svenXY
  • Comment on Re: What’s the best way to get the last N elements of a Perl array?