Yep,

select
case
endif

is plain wrong. The script should choke and die.
Post complete code, explain what you try to do and we may help
_________________________