Subject: Re: Mailing list redirection etiquette?
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Wed, 06 Oct 2004 16:35:36 -0700

Igor Pechtchanski wrote:

> google () {
>     url="http://www.google.com/search?q=`echo -n $*|perl -mCGI -pe '$_=CGI::escape($_)'`";
>     echo "Starting: $url"; cygstart -o "$url" >/dev/null
> }

You can remove dependence on CGI.pm by using

google () {
    url="http://www.google.com/search?q=`echo -n $* | \
      perl -pe 's/([^\w()\x27*~!.-])/sprintf "%%%02x", ord $1/eg'`";
    echo "Starting: $url"; cygstart -o "$url" >/dev/null
}

Brian

(oh and you'd want -MCGI not -mCGI if you want to use the module)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/