http://www.perlmonks.org?node_id=1023047

diamondsandperls has asked for the wisdom of the Perl Monks concerning the following question:

Need to make sure there is a return between my product entries. Notice the last entry and second entry run together. Also products is some random i just put product 1 and product 2 etc to provide the example text. Thank you to all who reply
Product 1 ------------------------------------------------------------------ storeId = 1001 phoneNumber = (111) 111-1111 availbilityCode = 1 stockStatus = Limited stock city = some city fullStreet = some address Product 2 ------------------------------------------------------------------ storeId = 2117 phoneNumber = (111) 111-1111 availbilityCode = 2 stockStatus = In stock city = some city fullStreet = some address Product 3 ------------------------------------------------------------------ storeId = 2123 phoneNumber = (111) 111-1111 availbilityCode = 1 stockStatus = Limited stock city = some city fullStreet = some address

Replies are listed 'Best First'.
Re: correcting output
by AnomalousMonk (Archbishop) on Mar 13, 2013 at 02:20 UTC
Re: correcting output
by igelkott (Priest) on Mar 13, 2013 at 00:12 UTC

    Should clarify if you're trying to fix the script that makes this output or just "post-process" the resulting file.

    To get help with a fix, show the relevant part of the code to produce this. To get help with post-processing, it would be good to show at least some attempt to do this yourself.

Re: correcting output
by Anonymous Monk on Mar 12, 2013 at 20:48 UTC

    How are you writing those records?

    You should probably collect all the data in a hash, then print it all at once in one place. You can make sure you've got a CRLF at the end of every record that way by looking at the print function.