in reply to Dumb terminals, interactive versus batch, text processing...

I think it could be more appropriate to use a terminal Emulator with SDK. The following are the ones that I have used:

SIMWARE ------- A2B ENTERPRISE ATTACHMATE ---------- EXTRA! FOR WINDOWS
The SDK provides built-in screen scraping, emulated key-stroke, etc. and works on virtually all kinds of terminals.

Otherwise if you want to do it in Perl, then check out the modules Device::SerialPort (linux) and Win32::SerialPort (windows) on www.cpan.org, and good luck.