You are solving this problem the wrong way. I normally use Text::CSV_XS for doing CVS reading/writing. It's dirt easy. In fact, it is so easy that I've just copied in some sample source for you to look at. If you want to go faster then you can start feeding it a filehandle to read from and other various tricks. Those are up to you and you'll ahve to read the documention on that.
#!/usr/bin/perl use Text::CSV_XS; use strict; use warnings; $| = 1; my $c = Text::CSV_XS->new; while (my $line = <>) { $c->parse($line); my @fields = $c->fields; if (1 < @fields) { $line = join("\t",@fields)."\n"; $line =~ s/\\//g; print STDOUT $line; } else { print STDERR $line; } }
__SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
In reply to Re: regexp problems
by diotalevi
in thread regexp problems
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |