in reply to Re^2: regex switch trouble
in thread regex switch trouble
Due to the way source filters work in Perl, you can't use Switch inside a string "eval".The reference to "source filters" there has to do with how the Switch module is implemented. When you use it, the code that ends up being executed is actually different in significant ways from the code that you wrote. That's why many people (including the author of the module) advise against using Switch in "production code" (i.e. for anything that needs to be rock-solid and readily maintainable).
As GrandFather pointed out, there are better ways to do what you need to do in this case.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: regex switch trouble
by blazar (Canon) on Jun 24, 2007 at 10:04 UTC | |
by graff (Chancellor) on Jun 24, 2007 at 17:35 UTC | |
by blazar (Canon) on Jun 24, 2007 at 19:25 UTC |