I'm trying to alternate between using two colors in a Perl/CGI script as follows:
I've also tried = instead of == (can't remember what each is used for). It's been awhile since I've worked with cgi. Any ideas?Code:#declaration: $color1 = "#1d91c9"; $color2 = "#d4d4d4"; $color = $color1; #code to change: if ($color == $color1) { $color = $color2; } else { $color = $color1; }




Reply With Quote