Perl Web 服务器初级编程[10]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 nistal 的 blog

                          use cgi::push;
                          my $cgi=new cgi::push;
                         $cgi->do_push(-next_page=> \$refresh,-last_page=>\$done );

                         sub refresh{
                                           my ($cgi,$count)=@_;       #passed in by cgi::push
                                           return  undef if $count==10;
                                          return  $cgi->start_html,$cgi->p(“the count is $count“),$cgi->end_html;
                                         }
                         sub done{
                                          my ($cgi,$count)=@_;
                                          return $cgi->start_html,“count stopped on $count“,$cgi->end_html;
                                       }
                        模块在内部把这个列表发送给print,所以print将接受的任何东西是-next_page或-last_page子程序的一个正确返回值



             

本文关键:Perl Web 服务器初级编程
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top