develooper Front page | perl.golf | Postings from June 2008

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

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
June 11, 2008 21:28
Subject:
Re: A challenge to explain the strange results (under linux)
Message ID:
20080612042819.GA80928@penkwe.pair.com
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//d' color.txt

Ronald

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About