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));