http://www.perlmonks.org?node_id=1003718


in reply to Re^2: Get record separator of a file
in thread Get record separator of a file

OK, I will try my best to explain.

I can see the recsep of a file with:

Karls-Mac-mini:Desktop karl$ hexdump -c -n 8 file.txt 0000000 f o o ; b a r \n + 0000008

Or i hope so.

But i really don't want to check it this way.

I have many larger files with \r\n or \n as recsep.

So i thought about efficiency and figured out that Tie::File is faster than IO::File for my needs (i benchmarked it, but that is another issue).

But when i tied my @array to the original file, all data was put into the first slot of my @array. After setting the recsep option of Tie::File to \n, everything was good.

So i thought, it would be a good idea to do something like the hexdump command in perl to get the recsep - without loosing the performance boost that Tie::File gives me.

I hope very much that this is a better explanation about what i wanted to do.

Thank you very much for your patience and help.

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»