Information about LF+CR and Windows coding vs Linux coding for Perl programming -


I have a Perl script that works fine in the window but when I try to run it in Mac OS X, So it does not work perfectly. Can anyone explain the LF + CR? Why do not these lines end up on Unix? & Amp; If I want to run Linux / Unix, then what is there to do with the Perl script for windows in that case?

Say you have a file with the following byte:

  61 62 63 0D6465 66D / A>   

In the file by a Windows Definition of a text, 61 62 63 and 64 There are two rows consisting of 65 66 plus line terminator.

From the definition of Unix's text file (including MAC), in that file consisting of 61 62 63 0D and 64 65 66 0D plus line terminator There are two lines.

Since the lines are different, of course they do not do the same thing.

If you are on a Unix system and you should have two lines consisting of 61 62 63 and 64 65 66 plus line terminator, file the following bytes You must keep in touch with: dos2unix

  61 62 63 63 A 64 65 66 0a   

To translate Windows text files, / code> can use Unix text files in.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -