Public feed #528865

Someone

public text v1 · immutable
Raw Edit
·published 2007-06-01 18:28 UTC
rendered paste body
#!/usr/bin/perl
use CGI::Session;
our $session = new CGI::Session("driver:File", $cgi, {Directory=>'/tmp'}) or die 'yo';


sub check_ {
        $captcha_generated_key = $session->param("CAPTCHA"); // This makes problem. 
        $user_submited_key = $Config{'key'};
       
        if($user_submited_key != $captcha_generated_key) {
        die "<b>Sorry! Wrong captcha!<br />";
        }
        return 1;
    }

//  now i somehow call the check_ ( actually script does.. )

/*
Can't call method "param" on an undefined value at ****.pl line <<i wrote line down>>.
*/