Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Avoiding user-input in sub calls.

by barrd (Prior)
on Nov 01, 2003 at 13:14 UTC ( #303805=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <select name="foo">
    <option value="">Please make a selection
    <option value="first">First
    <option value="second">Second
    </select>
    
  2. or download this
    my $doit = $q->param('foo');
    my %functions = ('first'   =>  \&one,
                     'second'  =>  \&two
                    );
    
  3. or download this
    &{ $functions{$doit} };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://303805]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2015-07-05 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (64 votes), past polls