Copying lines from fileA if they start by a word from fileB

Hi I'm in the need of a script that basically takes two files and generates a 3rd. It reads from fileA and fileB and copies lines from fileA if they start by a word of fileB.

for example

fileA
The dog is beautful
Where is your cat
Why are you sad?
Help me!

fileB
The
Where
tree
dog

fileC would be like this
The dog is beautful
Where is your cat

awk 'FILENAME=="FileB" {arr[$0]++}
       FILENAME=="FileA" {if($1 in arr) {print $0}    } '  FileB FileA > FileC

Woah thanks a bunch for the almost instantaneous response, just tested and it works !

I have a similar thing I need:

I have a fileA with the following format
word(s) ||| word(s) ||| number
word(s) ||| word(s) ||| number
word(s) ||| word(s) ||| number

and a fileB which is just plain text. I want to copy into fileC the lines from fileA where the first word or sequence of words (everything before the first ||| delimiter) exists anywhere in the fileB.

For example if I have

abc def ||| foobar ||| 123

I want to copy the line only if fileB contains "abc def", not just abc.

No homework. Thread closed. Infraction given.