Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Newlines: reading files that were created on other platformsby blueberryCoffee (Scribe) |
on Feb 02, 2005 at 01:23 UTC ( [id://427113]=note: print w/replies, xml ) | Need Help?? |
Since the \015 and \012 are not used for anything but newlines why not just look through the file _untill_ you see \015 or \012. If \015 is found and followed by \012 you know it is windows. If \015 without \012 you know its mac, and \012 by itself is linux.
In Section
Seekers of Perl Wisdom
|
|