Help for this page

Select Code to Download


  1. or download this
    $_ = qq(item1,field2,more data,"a quoted, comma containing string"\n);
    @data = /(\".*?\"|.*?)[\n,]/g;
    
    $j = 0; printf "%d: %s\", $j++, $_ for @data;
    
  2. or download this
    0: item1
    1: field2
    2: more data
    3: "a quoted, comma containing string"