- or download this
foreach my $line (<$infh>) {
if ($line =~ /$re_data/) {
...
push @data, "(" . join(",", split(/\s+/, $line)) . ")";
}
}
- or download this
# Simply 'join' all data; last record contains neither comma nor newli
+ne.
my $data = join(",\n", @data);
- or download this
#!/usr/bin/perl
...
print $outfh $text;
close($outfh);
say "Wrote '$output'";
- or download this
SELECT CUSTOMERID, ORDERID, CUSTOMERNAME, CUSTOMERLOCATION
FROM DB.CUSTOMER_DATA
...
(0005,60000005,mike,IN),
(0006,70000006,bill,AK)
)