in reply to Re^4: Referring to an array without copying to a separate variable first
in thread Referring to an array without copying to a separate variable first

Just noticed your update. I don't know how old that trick is but I do use it quite often — most recently in the last hour for checking a subroutine's arguments:

my (..., $some_scalar_ref, ...) = @_; say "... @{[$$some_scalar_ref // '<undef>']} ...";

Anyway, thanks for the feedback. ++

-- Ken

  • Comment on Re^5: Referring to an array without copying to a separate variable first
  • Download Code