in reply to Assigning a variable to a Hash key reference

"($ref(@records)->{ven})"
You realize that
  1. $ref(@records) is using round brackets which indicate a subroutine call,
  2. you cannot call a subroutine on a CODEREF that way if that was what you are trying to do (it would be $ref->(@records)),
  3. and that it won't actually evaluate to a subroutine call inside quotes.
I think you need to explain some more.

Makeshifts last the longest.