pattern matching question
From: John McCormick (tarrou24_at_yahoo.com)
Date: 12/23/04
- Next message: Jonathan Paton: "Re: Accessing DLL functions"
- Previous message: Earthlink-m_ryan: "LWP::UserAgent establishing session CFM"
- Next in thread: Jonathan Paton: "Re: pattern matching question"
- Reply: Jonathan Paton: "Re: pattern matching question"
- Reply: Chris Charley: "Re: pattern matching question"
- Reply: Chris Devers: "Re: pattern matching question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Dec 2004 10:39:12 -0800 (PST) To: beginners@perl.org
i'm trying to figure out how to split a file delimited
by commas and newlines.
@data = split (/\n|\,/, <infile>)
the only problem is that some of the data fields are
strings enclosed in double quotes, and within some of
those double quotes are more commas. that's too
tricky for me. how do i do that?
thanks!
court
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
- Next message: Jonathan Paton: "Re: Accessing DLL functions"
- Previous message: Earthlink-m_ryan: "LWP::UserAgent establishing session CFM"
- Next in thread: Jonathan Paton: "Re: pattern matching question"
- Reply: Jonathan Paton: "Re: pattern matching question"
- Reply: Chris Charley: "Re: pattern matching question"
- Reply: Chris Devers: "Re: pattern matching question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|