in reply to Simple query regarding unpack/splice

I think you want to replace
@datapoint = splice(@values, 0, $x);
with
push @datapoint, splice(@values, 0, $x);

That is, you want to add a new entry to the datapoint array.

While you're at it, you might want to

Replies are listed 'Best First'.
Re^2: Simple query regarding unpack/splice
by sf_ashley (Sexton) on May 08, 2008 at 16:41 UTC
    Thanks for the suggestion apl. Indeed, probably having the strict and warnings pragma enabled could well have highlighted this.