#!/usr/bin/perl
use LWP::Simple;


$file = get "http://twitter.com/statuses/user_timeline/britneyspears.xml";

$seenTextTag =0;
@lines = split(/\n/,$file);
foreach $line (@lines) {
  if ($line =~/<created_at>(.*)<\/created_at>/) {
       print "$1\n";
  }
  if ($line =~/<text>(.*)<\/text>/) {
       print "$1\n";
  }
  else {
    if ($line =~/<\/text>/) {
     $seenTextTag = 0;
   }
   if ($seenTextTag == 1) {
     print $line;
   }
   if ($line =~/<text>/) {
     $seenTextTag = 1;
   }
  }
}







