"a", "as " sd", "123"
"b","asd"," 234"
"c","as d","345"
I wanted to make the output this:
a,as " sd,123
b,asd,234
c,as d,345
the code i tried is this
Code:
use strict; use Text::CSV_XS;
use strict; use Text::CSV_XS;
$csv = "test.csv";
open(DAT, $csv) || die("Cannot Open File");
while (<DAT>) {
my @new = ();
push(@new, $+) while $_ =~ m{ #what does these means
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
a,123,123 b,234,234 c,345,345
$csv = "test.csv";
open(DAT, $csv) || die("Cannot Open File");
while (<DAT>) {
my @new = ();
push(@new,
'asd,asd,asd','123','123' 'asd','456','123'
$csv = "test.csv";
open(DAT, $csv) || die("Cannot Open File");
while (<DAT>) {
my @new = ();
push(@new, $+) while $_ =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
$csv = "test.csv";
open(DAT, $csv) || die("Cannot Open File");
while (<DAT>) {
my @new = ();
push(@new, $+) while $_ =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
| ([^,]+),?
| ,
}gx;
my $csv = "test.csv";
my @data = read_file($csv);
foreach($a=1; $a<@data.""; $a++)
{
print @data[$a];
}
sub read_file{
open(F, $_[0]) || die("Can't
Leave a comment: