redirect input within case statement?

I'm trying to run the logic below but get a `<' is not matched error message when I return a Y or y;

printf "Run this [Y/N]? : "
read RESP
case $RESP in
 Y|y)
    cat <<EOF > file
      today is Monday
    EOF ;;
 N|n)
     exit 1 ;;
esac

Any ideas?

Move the ;; to a new line, and either put EOF at the beginning of the line, or indent it with a tab (i.e. not with spaces):

printf "Run this [Y/N]? : "
read RESP
case $RESP in
 Y|y)
    cat <<EOF > file
      today is Monday
EOF
;;
 N|n)
     exit 1 ;;
esac

worked, brilliant. :b:

cheers Scott