Yeah, I wasn't disagreeing with anything you said. Just pointing out why I think it unlikely to apply in this situation doesn't matter as far as how the code should work. Thanks.
| [reply] |
Just pointing out why I think it unlikely to apply in this situation
I think you're mistaken. The OP has said:
"So when my test data files were downloaded from CPAN on Windows, they still had Unix line endings and weren't being read in correctly"
The point I raised in my initial response explained that the "test data files" still had those "Unix line endings" simply because the utility that unpacked those files did not perform the unix2dos line-ending conversions (and that unix2dos conversions were something that might or might not occur, depending upon the configuration of said utility).
I'm not in the habit of submitting posts (correct or otherwise) to perlmonks that I believe to be inapplicable to the current thread .... well ... that is, unless I'm trying to be humourous.
Note: I'm reading the OP's "... weren't being read in correctly as meaning " ... weren't being read in as intended".
Cheers, Rob
| [reply] |
I'm not in the habit of submitting posts (correct or otherwise) to perlmonks that I believe to be inapplicable to the current thread
Unfortunately, my 2nd reply to you included "it [is] unlikely to apply in this situation", which is not correct. Sorry. What you describe is certainly a part of the process here. It was mostly that you replied to my question about why his code breaks in the face of certain line endings with a reply that had absolutely nothing to do with why his code cares about line endings.
I understand how CPAN practices make it easy for Unix line endings to end up in Windows text files. But I find Unix line endings in text files in Windows quite frequently anyway so I don't need any CPAN-specific reasons to motivate making Perl code not care about such, especially since his module surely needs to work on text files in Windows other than the ones that people download from CPAN.
And he had already gotten his code to work in the face of different line endings. I just felt that it was very likely that he was "doing it the hard way". So I was talking even more about how he should get his code to not care about line endings, which made talk of how which types of line endings come to be even further from that point.
So, to be clear, I am not questioning the validity of any of the information that you posted. I am not even questioning the appropriateness of where you posted it.
I just wanted to restate the kernel of my point in hopes of clarifying it and that it still stands, just because it wasn't obvious to me that this was clear to you or would be clear to readers of the thread.
Sorry about flubbing my 2nd attempt to clarify.
| [reply] |
"Note: I'm reading the OP's "... weren't being read in correctly as meaning " ... weren't being read in as intended"."
That's correct. I'm going to work today on eliminating Tie::File entirely, as it has caused other small bits of pain. I can see that it's a useful module, but as I said earlier, I just went overboard with it and could have avoided some troubles if I had of just used the standard IO techniques from the get-go.
| [reply] [d/l] |