Try this quest, when you'll make it working, start adding slowly some new stuff. When it stops to work, it means you made a mistake, search and correct it, then start again, that's the best way to learn )
Code:
sub EVENT_SAY {
if($text =~ /Hail/i) { quest::say("You said hail!"); }
}