http://qs321.pair.com?node_id=9737


in reply to When constructing a URL from script variables, how do I handle spaces properly?

In fact, if you are trying to construct
<a href="/cgi-bin/editmarine.pl?marine=$marineid">edit marine</a>
You'll run into a lot of problems if $marine is not URI-encoded. So the first step is to trot over to URI::Escape and run it through there. No spaces will be left!

Editor's note:

#Sample Code my $SafeMarine = URI::Escape::uri_escape($marineid); <a href="/cgi-bin/editmarine.pl?marine=$SafeMarine">edit marine</a>