Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

correcting output

by diamondsandperls (Beadle)
on Mar 12, 2013 at 20:36 UTC ( #1023047=perlquestion: print w/ replies, xml ) Need Help??
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

Comment on correcting output
Download Code
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.

Re: correcting output
by igelkott (Curate) 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 AnomalousMonk (Monsignor) on Mar 13, 2013 at 02:20 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1023047]
Approved by igelkott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (23)
As of 2014-08-22 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (161 votes), past polls