Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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
Replies are listed 'Best First'.
Re: correcting output
by AnomalousMonk (Abbot) on Mar 13, 2013 at 02:20 UTC
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.

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 pondering the Monastery: (12)
As of 2015-07-31 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls