This is only an issue if you share files between platforms. In that case, there is no single answer. It depends not only on the platforms, but on how you share the files. Please tell us more about your appliction.
| [reply] |
my program works with the text file (consisting of lines :)
program does selection of a line of this file on its offset, which is in advance known.
Offset is set in bytes from the file beginning...
On win32 script will work not as on Linux/UNIX...
| [reply] |
The windows version of you text file may have windows newlines (depending on how you transferred and/or edited it.) If it does, the offsets will be different than in *nix. If does not, you must open the file in binary mode. I cannot offer any more help without knowing your objective.
| [reply] |
Do you want to match them or to print them? In second case, consider using apporpriate IOLayers (for example, :crlf is used automatically on Win32), also consult the apporpriate perlport section. | [reply] |
Note: \R requires Perl 5.18 or higher.
----
I Go Back to Sleep, Now.
OGB
| [reply] |
So why its documentation says
\R was introduced in perl 5.10.0.
| [reply] |
Why?
If you just do print "stuff\n" it will just work everywhere. If you want to do something else, please explain.
| [reply] [d/l] |
You may find the variables $/ and $\ helpful. These are described in perlvar and there are examples throughout.
| [reply] [d/l] [select] |