Are you really including a space in the URI?
Never do that: %20 instead: see `perldoc perlfaq9`:
How do I decode or create those %-encodings on the web?
Here's an example of decoding:
$string =
"http://altavista.digital.com/cgi-bin/query?pg=q&what=news&fmt=.&q=%2Bcgi-bin+%2Bperl.exe";
$string =~ s/%([a-fA-F0-9]{2})/chr(hex($1))/ge;
Encoding is a bit harder, because you can't just blindly change all the
non-alphanumunder character (`\W') into their hex escapes. It's
important that characters with special meaning like `/' and `?' *not* be
translated. Probably the easiest way to get this right is to avoid
reinventing the wheel and just use the URI::Escape module, available
from CPAN.
HTH
Lee
At 08:57 08/03/01 -0600, [EMAIL PROTECTED] wrote:
>I have a CGI program that I want to pass a field as an argument in a
>link that has a # (pound sign) in it. When it gets to the next page,
>anything after the # is truncated as if it is a comment.
>
>Example:
>
>Backup #1 Comes across as just Backup
>
>I don't know if this is a regex question or not but how can I get my
>script to disregard that #?
>
>Stanley G. Martin
>Midwest Consulting Group
>Sprint Platform & Strategy Mgmt
>913.315.3133
>[EMAIL PROTECTED]
Lee Goddard <mailto:[EMAIL PROTECTED]>
________________________________________________________
Perl / XML / XSLT / Java / JavaScript / HTML / etc
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web