-
-
Save 2shortplanks/062e5d81493dd3955f75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Mojo::Client; | |
my $client = Mojo::Client->new; | |
my $url = Mojo::URL->new("https://www.googleapis.com/language/translate/v2")->query( | |
key => 'AIzaSyAVlesUTcrwoEKw9fZ_LzPm6aERyLvm39E', | |
q => scalar do { local $/; <> }, | |
target => "fr", | |
); | |
my $response = $client->get($url)->res; | |
use Data::Dumper; | |
print STDERR Data::Dumper->Dump([ $response ],[split /,\s*/,q[$response]]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment