One thing that logic/functional languages do automatically is separate
source of input from computation. It's much harder to interleave
computation and its display in such languages, thereby making the need
for a generic tool to dispatch to CGI or CLI necessary.
Then again, that interspersal is sometimes useful - if you have a huge
file to spit back via HTTP that is computed on the fly, you dont want to
wait for all computation to occur before the output phase...