einerwitzen has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (cgi programming)
I have a cgi file that recieves $function and $file. and has if/then statements saying things like
it's messy and hard to work with this way (a lot more funstions than i showed :), is there a way to do the same sort of thing without if then statements?if ($function eq "open") { open (BLAH, "$file"); #actions close (BLAH); } elsif ($function eq "create") { open (NETH, ">$file"); #actions close (NETH); } else { #actions }
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How can I run only part of a script determined by a posted variable?⭐
by hossman (Prior) on Jan 15, 2002 at 13:23 UTC | |
by hossman (Prior) on Jan 15, 2002 at 13:33 UTC | |
Re: How can I run only part of a script determined by a posted variable?⭐
by gt8073a (Hermit) on Jan 15, 2002 at 13:47 UTC | |
Re: How can I run only part of a script determined by a posted variable?
by gav^ (Curate) on Jan 16, 2002 at 09:15 UTC | |
Re: How can I run only part of a script determined by a posted variable?
by Lucky (Scribe) on Jan 19, 2002 at 14:09 UTC | |
Re: How can I run only part of a script determined by a posted variable?
by Anonymous Monk on Jan 15, 2002 at 21:41 UTC |
Back to
Seekers of Perl Wisdom