bazz
08-06-2008, 03:24 AM
I am working on a script which receives the params form a form.
when I output the params I get this strange symbol between the outputs.
what is it?
it seems only to show if there are two things in the value part or two in the keys part.
key=0 ::
key=1 ::
key=Continue with Booking ::
key=Flowers :: yes�Bouquet in a Vase
key=Pillows :: yes�Hollow-Fibre Pillow
key=number_of_adults :: 1
key=number_of_children :: 0
key=submit :: Continue with Booking
key=yes�Bouquet in a Vase ::
key=yes�Hollow-Fibre Pillow ::
here's my params code.
my $query = CGI->new;
my %params = $query->Vars;
# loop thru hash and remove dodgey chars
while (my ($key, $value) = each(%params))
{
if ($key =~ /^\;+$/)
{
#print qq( dodgey input);
$key =~ s/;//g;
}
if ($value =~ /^\;+$/)
{
#print qq( dodgey input);
$value =~ s/;//g;
}
}
foreach my $key (sort %params)
{
print qq( key=$key :: $params{$key} <br /> );
}
bazz
when I output the params I get this strange symbol between the outputs.
what is it?
it seems only to show if there are two things in the value part or two in the keys part.
key=0 ::
key=1 ::
key=Continue with Booking ::
key=Flowers :: yes�Bouquet in a Vase
key=Pillows :: yes�Hollow-Fibre Pillow
key=number_of_adults :: 1
key=number_of_children :: 0
key=submit :: Continue with Booking
key=yes�Bouquet in a Vase ::
key=yes�Hollow-Fibre Pillow ::
here's my params code.
my $query = CGI->new;
my %params = $query->Vars;
# loop thru hash and remove dodgey chars
while (my ($key, $value) = each(%params))
{
if ($key =~ /^\;+$/)
{
#print qq( dodgey input);
$key =~ s/;//g;
}
if ($value =~ /^\;+$/)
{
#print qq( dodgey input);
$value =~ s/;//g;
}
}
foreach my $key (sort %params)
{
print qq( key=$key :: $params{$key} <br /> );
}
bazz