in reply to Re^2: split on commas
in thread split on commas

You still didn't specify what data you need from the line. If you really just want to split on the commans, you can use Text::Balanced.
use strict; use warnings; use Text::Balanced qw( extract_bracketed extract_multiple ); while (<DATA>) { chomp; print("\n") if $. != 1; my @extracted = extract_multiple($_, [ ',', \&extract_bracketed, ]); my @pieces; push @pieces, '' if @extracted; for (@extracted) { if ($_ eq ',') { push @pieces, ''; } else { $pieces[-1] .= $_; } } print("$_\n") for @pieces; } __DATA__ <*2>FOO<2,1>,<*3>(SigB<8:0:2>,BAR),<*2>Siga<2:0>,Sigb<8,7,6,5,0>

Replies are listed 'Best First'.
Re^4: split on commas (Text::Balanced)
by pip9ball (Acolyte) on Jun 10, 2009 at 17:38 UTC
    Sorry, I apologize I didn't see this question. Yes, all I want is each token back.
    This solution seems to be working

    Thanks!