Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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

Replies are listed 'Best First'.
Re: correcting output
by AnomalousMonk (Chancellor) 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 (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.

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?
[Discipulus]: ah Corion you are where thatched roof are? good for you
Discipulus greeting from Dumbar?
Discipulus Umbar..

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2017-11-23 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (333 votes). Check out past polls.

    Notices?