in reply to Non buffered telnet?

You could easily make use of the Net::Telnet->recv() subroutine here, it allows you to specify how many bytes you'd like to receive at a time like so:

$tel->recv($buffer, 512);

Would retrieve 512 bytes from the $tel object into the $buffer scalar.

If you were simply retrieving the data for storage, it'd be pretty simple to write something like this:

open(OUTPUT, '>output.file'); while($tel->recv($buffer, 512)) { print OUTPUT $buffer; } close OUTPUT;
However, you noted that you'll be further editing the data before you're done with it, and also I get the sense that memory seems to be a primary concern in the issue.

One solution to this would be to use IO::File to create a temporary file to store the data in until you're done editing it:

my $output = IO::File->new_tmpfile(); while($tel->recv($buffer, 512)) { $output->print($buffer); }
Now, all of the output from your telnet session has been stored in the $output temporary file which you can use for further parsing and editing.