Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Logic Help - Output to csv

by Tux (Canon)
on Jun 08, 2020 at 06:53 UTC ( #11117800=note: print w/replies, xml ) Need Help??

in reply to Logic Help - Output to csv

Desired output

"sku","File 1", "File 2", "File 6", "File 7" "00123",""," +e/file.pdf",, "00124","",," +le/file.pdf", "00125",,"",," +ile/file.pdf"

Maybe I am just nitpicking, but I sincerely hope you do not want the spaces after the separator (", ") in the header line.

If you do, why not after the first separator? The required output as you show is extremely hard to generate and results in incorrect CSV data.

For all other advice, read haukex' answers.

For more speed, use Text::CSV_XS instead of Text::CSV.

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Logic Help - Output to csv
by Eily (Monsignor) on Jun 08, 2020 at 12:18 UTC

    Text::CSV already calls Text::CSV_XS when available, so in most case it won't have any impact on speed, and in some other cases it will stop working altogether.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11117800]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2023-06-10 02:04 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (36 votes). Check out past polls.