Help for this page

Select Code to Download


  1. or download this
    use Text::CSV;
    
    ...
    my $string = $csv->string();
    
    print $string;
    
  2. or download this
    my $inputstring = qq{field1\tfield2\t\"field3\t\t\"\tfield4\n};
    
    $inputstring =~ s{("(?: (?> [^\"\\]+ ) | \\ . )*")}{ (my $str = $1) =~
    + s/\t//g; $str }xesg;
    
    print $inputstring;