Changeset 51 in lab


Ignore:
Timestamp:
Sep 13, 2010 9:32:55 PM (14 years ago)
Author:
mitty
Message:
  • skip unimportant elements from the Dump
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/twitter/show_status.pl

    r50 r51  
    2929        my $res = $bot->show_status($id); 
    3030        use Data::Dumper; 
    31         print Dumper $res; 
     31        foreach my $line (split /\n/, Dumper $res) { 
     32            if ($line =~ /undef/) { next; } 
     33            unless ($line =~ / => {/ 
     34                ||  $line =~ / = / 
     35                ||  $line =~ /status/ 
     36                ||  $line =~ /'text'/ 
     37                ||  $line =~ /created/ 
     38                ||  $line =~ /'id'/ 
     39                ||  $line =~ /name/ 
     40                ||  $line =~ / },/ 
     41                ||  $line =~ / };/ 
     42            ) { next; } 
     43            print $line, "\n"; 
     44        } 
    3245    } 
    3346}; 
Note: See TracChangeset for help on using the changeset viewer.