[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Off-Topic Question about HTML code from CGI



> 
> Thanks for the idea Tim, but not a feasible solution as the results are
> being received by an outside affiliate, and they take receipt of this
> information with '.' not '.', so cant get them to change how they do it
> for everyone else just for this set of scripts.
> 
> If I write a basic HTML page and place '.' into it and preview it, it shows
> in the source as a '.' not the hex version, so is there anyway of having my
> script do its thing as normal and then conducting some sort of search and
> replace within the string to replace the hex '.' with a '.'
> 
> Surely that is achievable wouldnt you say? and would not affect anything
> else.

If you're just worried about the decimal:

#!/usr/bin/perl

use strict;
my $data = '12324324&#4600';
my $replace = '&#46';
$data =~ s/$replace/./g;

print $data;


-- 
Olaf Alders

olaf@xxxxxxxxxxxxxxx
http://vilerichard.com

Wed, June 5th -- Vile Richard @ Reverb (Queen and Bathurst, Toronto)