Using split on CDF files? 
Author Message
 Using split on CDF files?

OK, so I'd like to find a way to parse CDF files, perhaps using SPLIT.

Simple, right? Actually, I want to be able to parse comma&quote-delimited
files, where some fields may be delimited with just comas. For example:

"field 1","field 2",123.5,"field 3 is a number, not a string","field 4"

Is there any way to handle this in Perl? Is it possible to parse this with
a regular expression, or am I out of luck?

******************************************************************************

* CADENCE Magazine & AutoCAD Tech Journal | CompuServe: 71621,3173           *

*                                                                            *
* <URL: http://www.*-*-*.com/ ;     <URL: http://www.*-*-*.com/ ~psheerin/> *
* <URL: http://www.*-*-*.com/ ;                                              *
******************************************************************************



Thu, 17 Jul 1997 08:01:14 GMT  
 Using split on CDF files?

: OK, so I'd like to find a way to parse CDF files, perhaps using SPLIT.
:
: Simple, right? Actually, I want to be able to parse comma&quote-delimited
: files, where some fields may be delimited with just comas. For example:
:
: "field 1","field 2",123.5,"field 3 is a number, not a string","field 4"
:
: Is there any way to handle this in Perl? Is it possible to parse this with
: a regular expression, or am I out of luck?

In Perl 5 you can use Text::ParseWords to do this.  There's something like
it in Perl 4 called shellwords, though it splits on whitespace instead
of on commas, so you'd have to modify it.

Larry



Sun, 20 Jul 1997 09:50:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PERLFUNC: split - split up a string using a regexp delimiter

2. Using split to return a @ without splitting on spaces

3. PERLFUNC: split - split up a string using a regexp delimiter

4. Using split to chop up a flat database file

5. splitting file using eof question

6. Split large binary files using perl script?

7. ANNOUNCE: Math::CDF

8. splitting one file in many files

9. manipulating a large file and splitting in smaller files

10. Help! splitting a text file into separate files

11. Splitting a text file and creating separate files.

12. splitting one file in many files

 

 
Powered by phpBB® Forum Software