Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 18 lines (12 sloc) 0.391 kB
#!/usr/bin/env perl
use strict;
use warnings;
use REST::Google::Translate;
REST::Google::Translate->http_referer('http://sartak.org');
my $res = REST::Google::Translate->new(
q => "@ARGV" || do { join "\n", <> },
langpair => 'ja|en',
);
die $res->responseStatus if $res->responseStatus != 200;
binmode(\*STDOUT, ':utf8');
print $res->responseData->translatedText . "\n";
Jump to Line
Something went wrong with that request. Please try again.