ghouse has asked for the wisdom of the Perl Monks concerning the following question:

Hi, We are calling an URL with parameters ..It's as follows
http://docqa.lehman.com:8888/DDL/servlets/dv.search?deptID=159&pubTitl +e=3/16+--+Test2+-+word+and+powerpoint+attatchment,+past+picture+from+ +word.+Import+Excel+file.+with+banners+and+salutations.+Insert+picture +&deptType=HIDDEN
We need to encode the value for the parameter pubTitle is large and has special characters. I am not sure how do we do this ..Please let me know

Replies are listed 'Best First'.
Re: Encoding values for parameters in URL
by inman (Curate) on Apr 01, 2005 at 10:58 UTC
    Check out URI::Escape for the value escaping. Expect problems when the size of your URL grows to more than 2k. There is a hard limit at which the browser will ignore URL data.
      To get around the limit, switch to mimic a POST method instead of a plain GET - LWP and Mechanize can help with that.

      Flavio (perl -e "print(scalar(reverse('ti.xittelop@oivalf')))")

      Don't fool yourself.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Encoding values for parameters in URL
by FitTrend (Pilgrim) on Apr 01, 2005 at 13:48 UTC