#!/usr/bin/perl use strict; use CGI; use Authen::Captcha; my $query = new CGI; # # Generate captcha # # Note: in a real script, the data_folder should be placed # outside the www document root # my $captcha = Authen::Captcha->new( data_folder => '/var/www/html/captcha', output_folder => '/var/www/html/captcha', ); my $captcha_characters = 4; my $MD5 = $captcha->generate_code($captcha_characters); # # Print report # print $query->header(); print "";