-
-
Save oxnz/7029544 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
use strict; | |
use warnings; | |
use URI::Escape qw(uri_escape_utf8); | |
use open IO => ":utf8", # UTF8 by default | |
":std"; # Apply to STDIN/STDOUT/STDERR | |
my $query = do { local $/; <> }; | |
$query =~ s/^\s+//g; | |
$query =~ s/\s+$//g; | |
my $url = "http://www.google.com/search?&q=" . uri_escape_utf8($query); | |
system("/usr/bin/open", $url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment