develooper Front page | perl.perl5.porters | Postings from September 2001

what are newlines under Win32??

From:
Nikola Knezevic
Date:
September 29, 2001 16:36
Subject:
what are newlines under Win32??
Message ID:
18622690572.20010930011729@tesla.rcub.bg.ac.yu
Can someone with Win32 system tell me what is he getting with:

perl -e "$x=`echo hi there`;" -e "print ':'.ord($_) foreach (split //,$x);"



I get this:
e:\perl_extra\workin_bleadperl\t>set PERLIO=stdio
e:\perl_extra\workin_bleadperl\t>perl -e "$x=`echo hi there`;" -e "print ':'.ord
($_) foreach (split //,$x);"
:104:105:32:116:104:101:114:101:10
e:\perl_extra\workin_bleadperl\t>set PERLIO=perlio
e:\perl_extra\workin_bleadperl\t>perl -e "$x=`echo hi there`;" -e "print ':'.ord
($_) foreach (split //,$x);"
:104:105:32:116:104:101:114:101:13:10


Which causes many of the tests to fail. Even `cd` is dangerous, because
it leaves \015 at the end of string, so chdir "something\015" fails...

-- 
 .            `\!,        
 .            <. .>    
 [=======oOo==( ^ )==oOo========[ indy@hemo.net ]=======]      
 |---      _    -            --- [    member of    ]--- |        
 [========( )======_==============[ .counter attack. ]==]           
 .         ()     ( )
 .                ()




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