Here's a small proof that that "other coder" is no friend of yours.
use strict;
use warnings;
use CGI qw(:standard);
use URI;
my $uri = URI->new( url() );
$uri->query(undef);
if ( my $redirect = param("redirect") )
{
my $cookie = cookie( -value => $redirect,
-name => "nom" );
print redirect( -uri => $uri,
-cookie => $cookie,
-status => 302 );
}
else
{
my $cookie_value = cookie("nom");
my $cookie = cookie( -value => "cleared",
-name => "nom" );
print
header(-cookie => $cookie),
start_html("Redirection with Cookies and Milk"),
h1("OH HAI, I CAN HAZ COOKEE?"),
h2("Nom, nom: ", $cookie_value),
start_form(),
radio_group( -name => "redirect",
-value => [ qw( A one two three ) ],
),
submit(),
end_form(),
end_html();
}
Just verified to work in IE (6), FF, and Safari. :)