in reply to Add Quotes to entries in a file

Piece of cake!
perl -pe 's/;/";"/g; s/";"/;"/; s/"$//' input > output

The first substitution wraps each semicolon in double quotes. The second one removes the double quotes before the first semicolon, the third one removes the last double quote.

To copy the file, you can also use Path::Tiny's copy or File::Copy's copy or cp.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Add Quotes to entries in a file
by Anonymous Monk on Jul 12, 2018 at 14:01 UTC
    Delightfully clever, turning the statement of the problem on its head to create an elegant solution.