in reply to unix cat

Are you sure $filename is set, contains no spaces, and that a file by that name exists? The waitfor call should be unnecessary after a cmd according to Net::Telnet docs.

Caution: Contents may have been coded under pressure.