perl.scripts...Re: Parsing a text file with mutuple seperator by John W. Krahn- April 9, 2008 wolfpack307yahoo.com wrote:> Hi all,Hello,> I am writing a perl script to parse a file. The data in the file is> seperated by spacetab. However, certain fields may be empty or> consist of mutiple words and are double quoted and this makes it> difficut for me to do a split.> > Example of data:> "" "This is 2nd field"> 3 4> 1 2> "" .http://www.nntp.perl.org/group/perl.scripts/2008/04/msg441.html Re: Parsing a text file with mutuple seperator by wolfpack307- April 8, 2008 Yes Brad,I have tried the Text::ParseWords and that is exactly what I amlooking for.ThanksOn Apr 8, 8:39 pm, b...mail.libs.uga.edu (Brad Baxter) wrote:> If I were you, I&39;d use Text::ParseWords::parse_line()>>>> On Mon, Apr 7, 2008 at 9:11 PM, <wolfpack...yahoo.com> wrote:> > Hi all,>> > I am writing a perl script to parse a file. The data in the file is> > seperated by spacetab. However, certain fields may be empty or> > consist of mutiple.http://www.nntp.perl.org/group/perl.scripts/2008/04/msg440.html Re: Parsing a text file with mutuple seperator by Johan Vromans- April 8, 2008 wolfpack307yahoo.com writes:> I am writing a perl script to parse a file. The data in the file is> seperated by spacetab. However, certain fields may be empty or> consist of mutiple words and are double quoted and this makes it> difficut for me to do a split.> > Example of data:> "" "This is 2nd field"> 3 4> 1 2> "" .http://www.nntp.perl.org/group/perl.scripts/2008/04/msg439.html Re: Parsing a text file with mutuple seperator by Otavio- April 8, 2008 Either you use the module mentioned or try a multi stage split. It´suglier but is a way to get the work done.First I´d split he data by ("s+"") then by (""s+") then I´d dealwith the tabs....Just my two cents. ;-)On 8 abr, 09:39, b...mail.libs.uga.edu (Brad Baxter) wrote:> If I were you, I&39;d use Text::ParseWords::parse_line()>> On Mon, Apr 7, 2008 at 9:11 PM, <wolfpack...yahoo.com> wrote:> > Hi all,>> > I am writing.http://www.nntp.perl.org/group/perl.scripts/2008/04/msg438.html Re: Parsing a text file with mutuple seperator by Brad Baxter- April 8, 2008 If I were you, I&39;d use Text::ParseWords::parse_line()On Mon, Apr 7, 2008 at 9:11 PM, <wolfpack307yahoo.com> wrote:> Hi all,>> I am writing a perl script to parse a file. The data in the file is> seperated by spacetab. However, certain fields may be empty or> consist of mutiple words and are double quoted and this makes it> difficut for me to do a split.>> Example of data:> "" "This is 2nd field"> 3 .http://www.nntp.perl.org/group/perl.scripts/2008/04/msg437.html Parsing a text file with mutuple seperator by wolfpack307- April 7, 2008 Hi all,I am writing a perl script to parse a file. The data in the file isseperated by spacetab. However, certain fields may be empty orconsist of mutiple words and are double quoted and this makes itdifficut for me to do a split.Example of data:"" "This is 2nd field"3 41 2"" 41 2 "The field may...http://www.nntp.perl.org/group/perl.scripts/2008/04/msg436.html |