Hey Gangabass, thanks for the reply. Yeah I tried that, but that falls down as well. Think that's because $database is called inside that string which if in single quotes, will only return '$database' and not the variables contents.
Is there a way I can get the output of whatever the commandline is saying to my telnet statement back onto my local commandline so I can see if it's saying giving NULL command, or broken pipe etc?
Thanks