in reply to formats output \r\n question

In perl 5.8.x you can use the following solution:
#!/usr/bin/perl binmode STDOUT, ':crlf'; print STDOUT "town\n";
All newline characters will be converted to CRLF.