答复: A challenge to explain the strange results (under linux)

2008-06-11 Thread Zhu Shanshan
inSCP has deleted "\r" for me and that's why I could luckily work, previous. Anyway, thank you again! -邮件原件- 发件人: Ronald J Kimball [mailto:[EMAIL PROTECTED] 发送时间: 2008年6月12日 12:28 收件人: Zhu Shanshan 抄送: Perl Golf 主题: Re: A challenge to explain the strange results (under l

Re: A challenge to explain the strange results (under linux)

2008-06-11 Thread Ronald J Kimball
I would bet that your color.txt file has Windows line endings on all platforms. If you do this: perl test.pl color.txt | less you may find that you're getting output after all. Make sure color.txt has Unix line endings on the Linux machines. Here's one way to fix it: perl -pi -e 'tr/\r//

A challenge to explain the strange results (under linux)

2008-06-11 Thread Zhu Shanshan
I used perl "v5.8.5 built for i386-linux-thread-multi". My data: # File:color.txt chartreuse deeppink goldenrod lightblue dodgerblue darkgoldenrod My scripts: # File: test.pl use strict; use warnings; open IN,"color.txt" or die; while (){