foreach my $id (@ARGV) {
my $res = $bot->show_status($id);
use Data::Dumper;
- print Dumper $res;
+ foreach my $line (split /\n/, Dumper $res) {
+ if ($line =~ /undef/) { next; }
+ unless ($line =~ / => {/
+ || $line =~ / = /
+ || $line =~ /status/
+ || $line =~ /'text'/
+ || $line =~ /created/
+ || $line =~ /'id'/
+ || $line =~ /name/
+ || $line =~ / },/
+ || $line =~ / };/
+ ) { next; }
+ print $line, "\n";
+ }
}
};
if ($@) {