Your problem is in the line reading:
$vectorRef = { 'time' => \(), 'data' => \() };
Using \() is like trying to take the address of nothing and it appears that Perl does in fact interpret this as nothing. Actually, It almost seems like this should be a warning, but use warnings doesn't complain. Running it in the perl debugger (via the -d switch) shows $vectorRef to contain the following:
0 HASH(0x8162084)
'time' => 'data'
Obviously, this isn't what you meant. The solution is to change each \() to [] which is the anonymous array reference constructor (less line noise too). This would make the code read:
$vectorRef = { 'time' => [], 'data' => [] };