It always based on the input. Your input is not well formatted (not fixed length, not CSV) so the easiest would be the regexp method.
while (my $line = <$fh>){
my ($date) = split(/,/,$line,2);
if ($line =~ s!<messageText>(.+?)</messageText>!!is){
print "$date\n$1\n";
}
}