Depending on what the larger problem is, you may be better looking at something like Parse::RecDescent. Even if you stick to manual parsing, using a more explicit coding structure as shown in dragonchild's example would pay off in terms of maintenance.
In reply to Re^3: map a list
by GrandFather
in thread map a list
by evil_otto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |