in reply to Matching Question

If you add   use strict; then the problem might jump right out at you.

Actually, though, you have several problems. One of which is that   $text = "go" is an assignment, not a test, and not the right test for strings. Fix that, and the problems that strict reports, and you'll be a lot closer to solving this yourself.