use warnings; use strict; use XML::Simple; # Just an example. You'd use LWP to get the actual CB. my $xml = 'Rendered by the Chatterbox XML Ticker test pong /me test again; :) <a href="#">please note the use of HTML tags</a>'; my $ref = XMLin($xml); foreach my $msg (@{$ref->{'message'}}) { my $h = substr($msg->{'time'}, 8, 2); my $n = substr($msg->{'time'}, 10, 2); my $author = $msg->{'content'} =~ s/^\/me// ? $msg->{'author'} : "<$msg->{'author'}>"; print "$h:$n $author: $msg->{'content'}\n"; }