Seems japhy gave you your answers. I just thought I'd help clear up a little confusion you seem to have about regular expressions... Your pattern, /-+ show switchname -+\n(\w+)/sm, indicates you don't understand the /m and /s modifiers. The /s modifier is only relevant when your pattern uses a dot (.) in which case it makes the dot match a newline as well as any other character. The /m modifier is only relevant when your pattern uses anchors (^ or $) in which case it'll make the anchors match before and after embedded newlines rather than only at the beginning or end of the whole string.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: $/ is playing havoc with my script.
by sauoq
in thread $/ is playing havoc with my script.
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |