in reply to Re: Telnet print issues...
in thread Telnet print issues...

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

Replies are listed 'Best First'.
Re^3: Telnet print issues...
by SuicideJunkie (Vicar) on Oct 03, 2007 at 13:30 UTC

    In that case, how about breaking it up into concatenated substrings?

    tel->print('/apps/current/bin/getz -vf "off des" "[' . $database . ' -type: primary|predicted]" &> /data/holdFile.txt');

    As for capturing the output of your command, try the backticks: http://perldoc.perl.org/perlop.html#%60STRING%60