I ended up just preserving $1 inside are var before the switch. I've never had a problem using Switch, and for this code (sorry, can't post it) I have a several nested if's inside of each case. I'll test it again and see if removing the switch improves performance.switch ($val) { case /^\s*(\S+)$/{ print "$1\n"; }
In reply to Switch and $1? by pianogirl95
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |