#!/usr/bin/perl use strict; use warnings; BEGIN{my $donce = 0; sub incr{ $donce++;} sub getdo{return $donce}} use LWP::Simple; use CGI qw/:standard/; print "Content-type: text/html\n\n"; had(); #lets me know if user has selected a option yet if(getdo() == 0) {s_page(); incr();print getdo();} else { if(param("option") eq 'login') { l_page(); } else { r_page(); } } foot();