in reply to efficientcy
#!/usr/bin/perl use CGI; use strict; my $query = new CGI; print $query->header; my %func_map = ( home=>\&home, news=>\&news, ); my $default = "home"; my $location = $query->param("place") || $default; $location = $default unless exists $func_map{$location}; $func_map{$location}->(); sub home{ print "this is home"; } sub news{ print "this is news"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: efficiency
by john1987 (Acolyte) on Jan 26, 2001 at 06:14 UTC |