Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
298 B

12 years ago
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use 5.10.0;
  5. use JSON;
  6. use IO::Handle;
  7. my $coder = JSON::XS->new->utf8->pretty->allow_nonref;
  8. STDOUT->autoflush(1);
  9. while (my $record = <STDIN>) {
  10. chomp ($record);
  11. my $decoded = $coder->decode($record);
  12. say $coder->encode($decoded->{message});
  13. }