No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
Setting `local $/ = undef;` means that you’ll read in the complete CSV file as a single string. That is, you only end up with one piece of information, rather than the separate fields you expect. I suggest using the Text::CSV module to get the contents of the CSV file …
What you need can actually be done using a one-liner. perl -i.bak -pe 's/\n\n/\n/sg' inputtxt This would edit `inputtxt` in place and leave the original with a .bak file extension. The /i regex switch is not needed, as you are only working with newline characters.
As there is no ‘generic’ XML format that one can just convert anything into, you’ll need to specify the XML schema before anyone can help you with your task.
Hi, I’m trying to use the following code in C++ on Mac OS X Snow Leopard to get the output of an external program through a pipe. [code=c++] FILE * al = popen("program program.cfg", "r"); string data; char buffer[100]; while (fgets(buffer, 100, al) != NULL) data.append(buffer); cout << "«" << …
The End.
class11a