Re: setting variable in certain cases

2005-04-14 Thread Jan Eden
Hi, Offer Kaye wrote on 14.04.2005: >On 4/14/05, Jan Eden wrote: >> >>In example 1, I have to set the variable explicitly 5 times, in >>example 2, I have to manually list all cases outside the switch >>statement, which bears the risk of forgetting to modify the line >>once I extend the switch sta

Re: setting variable in certain cases

2005-04-14 Thread Offer Kaye
On 4/14/05, Jan Eden wrote: > > In example 1, I have to set the variable explicitly 5 times, in example 2, I > have to manually > list all cases outside the switch statement, which bears the risk of > forgetting to modify the > line once I extend the switch statement. > > So is there a better

setting variable in certain cases

2005-04-14 Thread Jan Eden
Hi, I have a switch statement containing 10 different cases. in 5 of the cases, I need to set a variable to a certain value. The ways I could think about are: - setting the variable within each case statement, e.g. case 'slurp' { $parameters{type} = 'gallery'; ... } - use a se