in reply to Simple query regarding unpack/splice

Unless you're dealing with very large numbers of values, you're working way too hard. pack takes a list of inputs and can process a whole array at a time. So the output to a file can be as simple as:

open OUT, '>:raw', 'data.bin' or die $!;; print OUT pack 'V*', @values;; close OUT;;

And to read them back, unpack can process an unknown length string and produce a list. So that makes it as simple as:

open IN, '<:raw', 'data.bin' or diie $!;; my @values = unpack 'V*', do{ local $/; <IN> };; close IN;;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."