in reply to Warnings - Argument isnt numneric

Look at the splice documentation - if there is a third argument, it's interpreted as the length of the splice. So you have to pass a length argument - if you want to insert, the length (of the replaced list) is 0.

Replies are listed 'Best First'.
Re^2: Warnings - Argument isnt numneric
by weezer_316 (Novice) on Jul 08, 2008 at 09:21 UTC
    gents,

    Yes, @test does contain what I think it does. The actual file in question was once an excel i think, and i slit on whites[ace. I added the comma's in for clarity.

    ill look up the splice docs first. I have Programming perl sitting here and i didnt see a thing in ti about the 3rd argument.

    Failing that, I will investigate datetime module.
      moritz is right. To insert the value in $new_day before the 4th element of @test, you need
      splice(@test, 3, 0, $new_day);

      It reads as: "Replace 0 elements of @test starting at index 3 with the single value $new_day". See splice.

        Ikegami, moritz

        Many many many thanks. Cracked it. Very much appreciated