$text = "whatever_you_already_havefoobar\n"; # $1 eq "foobar" $text = "whatever_you_already_have foo\nbar"; # $1 eq "foo" $text = "whatever_you_already_have\nfoobar"; # $1 eq "foobar" $text = "whatever_you_already_have\nfoo bar"; # $1 eq "foo"