If this is the exact code you had on your windows box, you likely had a bug there too, even if you never noticed it.
The problem looks like you are matching against $_ in your eslif condition when you want to be matching against $str. Change that line to:
}elsif ($str =~/^\s*$/) {
In reply to Re: Use of uninitialized value in pattern match (m//)
by sauoq
in thread Use of uninitialized value in pattern match (m//)
by troyhughes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |