This is helping me a great deal; however, I am now confused at another step. When I run the above code you provided - I get the following output.

__DATA___ E:\code\perl>cli-pl-csvProcess.pl a.cs $VAR1 = [ [ '7', 'Ace hardware', 'Ace hardware1' ], [ '4', 'Acme cook book', 'Acme cook book1' ], [ '10', 'Attack show', 'Attack show1' ], [ '8', 'Baker\'s dozon', 'Baker\'s dozon1' ], [ '1', 'Beginning C', 'Beginning C1' ], [ '2', 'Beginning C++', 'Beginning C++1' ], [ '9', 'Jumbo frames', 'Jumbo frames1' ], [ '5', 'Jumping Jack Flash', 'Jumping Jack Flash1' ], [ '3', 'Python Intro', 'Python Intro1' ], [ '6', 'Zebra', 'Zebra1' ], [ '11', 'car 54 where are you', 'car 54 where are you1' ], [ '12', 'navy blue', 'navy blue1' ], [ '13', 'navy gold', 'navy gold1' ] ];

How can I format this back into a normal CSV format output? My goal is to create a new file called output like in my hacked python script..

I can handle the file appending part; however, I do not full understand what is taking place right now. Looks like an Array of an array was printed out, but I am not sure if that is what I want or need.


In reply to Re^4: Help with converting Python script to Perl for CSV sort by jasonwolf
in thread Help with converting Python script to Perl for CSV sort by jasonwolf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.