in reply to Improving the efficiency of this piece of code
#!/usr/bin/perl -wT use CGI qw(:all); use CGI::Carp qw(fatalsToBrowser); my %dispatch = ( '' => \&index, page2 => \&page2, page3 => \&page3, default => \&index, ); my $page = param('page'); my $subref = $dispatch{$page} || $dispatch{default}; $subref->();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Improving the efficiency of this piece of code
by repson (Chaplain) on Feb 25, 2001 at 14:08 UTC | |
by AgentM (Curate) on Feb 25, 2001 at 22:38 UTC | |
Re: Re: Improving the efficiency of this piece of code
by unixwzrd (Beadle) on Feb 25, 2001 at 06:24 UTC |