in reply to Re: Insert Element Into Array
in thread Insert Element Into Array

I would like to insert it in @L1 on the first line. I can't print the string because it needs to eventually be output as a CSV file. If I were to print it within the loop it would print on every other line. I still haven't found a simple solution to this. Any ideas?

Replies are listed 'Best First'.
Re^3: Insert Element Into Array
by NetWallah (Canon) on Jun 21, 2012 at 22:13 UTC
    But you are re-initializing @L1 (You use my @L1) inside the "for $line" loop.

    So, anything you add at the beginning will be obliterated by the re-initialization.

    Please re-think your logic, and reconsider my suggestion to print the titles first, before entering the loop.

    It matters little that the "print" output is redirected to a CSV file.

                 I hope life isn't a big joke, because I don't get it.
                       -SNL