Doesn't seem that hard. The code below outputs the BUG_Comments_COMBINED.csv file, though it doesn't worry at all about the order in which it outputs lines. If that matters to you, it can be adjusted.
#!/usr/bin/perl -l
use strict;
use warnings;
my %comment; #comment for each bug id
<DATA>; #skip header line
while(<DATA>){
chomp;
#the 4 in the split below ignores all comma in the comment text
my (undef, $bugid, $date, $body) = split(/,/, $_, 4);
$comment{$bugid} .= "$date $body ";
}
while (my ($id, $comment) = each %comment){
print "$id, $comment";
}
__DATA__
CommentId, BugId, Date, CommentBody
1023,9555,03/06/2008,This is the body
1024,9555,03/07/2008,This is the body
1025,9555,03/08/2008,This is the body
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.