in reply to Re: Multiple If Selections
in thread Multiple If Selections
Change
toif( $line =~ m/(Job|File|Image)/ )
so that you won't have to manually update the regex every time a case is added/removed/renamed. Changing the dispatch table and forgetting to update that regex would otherwise seem like a very easy way to introduce bugs which will leave you scratching your head for hours as you stare at the dispatch table and the called sub trying to figure out why they don't work together.my $re = join '\|', keys %dispatch; if ( $line =~ m/$re/ )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Multiple If Selections
by bobf (Monsignor) on Jan 07, 2008 at 18:26 UTC |