2011/5/5 Geospectrum <alan.hunt...@geospectrum.co.uk>: > Hi, > > I am putting together a simple website and would like visitors to be > able to type a number into a form (say 1234) and a perl script should > run open an existing page called .../1234.html or generate an error > page if the use enters a wrong number. I will have already uploaded > the page before a user enters the number so the per script can open it > rather than generate a new one (unless it can be generated on the fly > which may be better?) >
That's easy by returnning a redirection. For example, use CGI; my $q = CGI->new; my $page = $q->param("page_number"); print $q->redirect("/$page.html"); -- Jeff Pang www.DNSbed.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/