http://www.perlmonks.org?node_id=115022


in reply to search - a quick and dirty hack to search google fast using a text browser

When building the query string it is not sufficient to join the arguments with '+'. An argument might contain an embedded space, or other characters not legal in a URI. The URI needs to be encoded according to RFC 2396. For this purpose you can use the URI::Escape module:

use URI::Escape; $string = uri_escape(join(' ', @ARGV));