Help for this page

Select Code to Download


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