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子程序的一个正确返回值