in reply to Re: small change - evil consequences?
in thread small change to Text::ParseWords - evil consequences?

ok - let me start with, I did not completely understand the original regex's and your explanation helped me there. I changed the $delimiter section as you suggested.

My goal was to capture all fields implied in a tab-delimited line, as in something that would do the right thing when given this:

aabel Allyn Abel EL0 20030612182307 10.5.4.166 abeeman Ali Beeman EL1 ajens@ttsd.k12.or.us 200309 +02191509 10.8.0.219

There are actually 8 fields in both lines, based on the tabbing.

The problem with the previous code (sans the '| ($delimiter)' ) was that when I specified '\t' as a field seperator, the regex did not recognize multiple tabs correctly.

Ugh. and now that i go off and test this with the original module (because I was going to show you the problem exactly..), its working with the original regex. *sigh*

Perhaps reading Text::ParseWords caused me to clean up some code elsewhere that was causing the issue.

Thanks for taking the time to read through this.

Replies are listed 'Best First'.
Re: Re: Re: small change - evil consequences?
by Aragorn (Curate) on Oct 22, 2003 at 07:52 UTC
    Maybe I'm not understanding your problem, but wouldn't a split(/\t+/, $line) get the tab-delimited fields?

    Arjen

      Using \t+ as the delimiter regex wouldn't work for him because he wants to see null fields. That is, if he's got "a\tb\t\td" he wants to split it into ('a','b','','d').

      I think that the original issue he was having was something different.


      ------------
      :Wq
      Not an editor command: Wq