in reply to Perl split on regex match
my @cls = split ".", $field;
split operates on a regular expression, not a string. Most likely, you don't get the results you expect from that line.
Maybe try with
my @cls = split /\./, $field;
Also, it looks as if you're trying to parse CSV formatted text. Have a look at Text::CSV_XS to create a more robust CSV parser instead of manually trying to split the lines.
|
|---|