in reply to Formating text while download

The issue may be that you are looking at a Unix file on an MS system, they differ in their understanding of what constitutes a line break. You could modify your output to be suitable for reading on an MS system as follows
print "$fan : $fan \r\n\t";

Replies are listed 'Best First'.
Re^2: Formating text while download
by moritz (Cardinal) on Jul 30, 2009 at 07:24 UTC
    Or if you don't want to remember to write a \r next to an \n everywhere, you can apply the :crlf IO layer:
    binmode STDOUT, ':crlf'; print "$fan: $fan \n\t";