in reply to wrap contents of an array in single quotes separated by comma
win>perl -lne "push @arr, $_; END{print join ',', map{'\''.$_.'\'' } +@arr }" trash.txt #untested, only different quotation. linux>perl -lne 'push @arr, $_; END{print join ",", map{"'".$_."'" } +@arr }' trash.txt
|
|---|