[PerlChina] hashref return stuff

cnhacktnt cnhacktnt at gmail.com
Mon May 22 23:48:21 PDT 2006


hi,fayland~
    改成:
#!/usr/bin/perl

my $error = &validate();

if (%$error) {
    print 'error';
} else {
    print 'ok';
}

sub validate {
    my $error= { };
    return $error;
}
如何?
呵呵,昨天列表里比较热闹啊呵呵,可惜昨天我忙了一通宵PB课程设计,到今早4,5点才睡觉.
验证码那个我很早以前也去 perl 的新闻组问过,没人给出解决方法呵呵,不过后来知道了有些简单的验证码,通过分析其源码,是有规律可寻的,不过加上变形,干扰色之后就复杂了...应该没有一个统一的解决方法吧?



cnhacktnt
2006-05-23



发件人: fayland
发送时间: 2006-05-23 13:52:33
收件人: China-pm at pm.org
抄送: 
主题: [PerlChina] hashref return stuff

#!/usr/bin/perl

my  $error  =  &validate();

if  ($error)  {
       print  'error';
}  else  {
       print  'ok';
}

sub  validate  {
       my  $error  =  {  };
       return  $error;
}

会输出  error.  怎么写比较好?

--  
Fayland  Lam  //  http://www.fayland.org/  

_______________________________________________
China-pm  mailing  list
China-pm at pm.org
http://mail.pm.org/mailman/listinfo/china-pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/china-pm/attachments/20060523/d78d0150/attachment-0001.html 


More information about the China-pm mailing list