in reply to The best way to split tab delimited file

split uses a regex, not a string. (It is accepting your tab-in-a-string as a regex, but IMHO it shouldn't.)

Given that you can use a regex, it looks like in this particular case you want to split on tabs, unless the tab is preceeded by a comma. There are several ways to construct such a regex. A couple off the top of my head:

See perlretut for more ideas

update - too slow. Those two ideas were already mentioned.

  • Comment on Re: The best way to split tab delimited file