in reply to Problems with array references and 'use strict'
The issue is already solved. However, here are two comments.
Some say you should $vectorRef = {}; instead of $vectorRef = { 'time' => [], 'data' => [] }; as the arrays are autovivified. However, you don't actually need to initialize $vectorRef at all, as the hash is autovivified too first time the first push statement is run.
Also, if you still write $vectorRef = { 'time' => [], 'data' => [] }; for clarity, you don't need the quotes, as => does quoting automatically.
|
|---|