Ruby equivalent perl command to replace newlines from file?
I am trying to get the equivalent ruby command of this perl command
this is my file
centroid
100x50+0+0
28x22+39+9
19x22+68+12
15x23+5+13
15x24+22+10
This is my perl recommendation command:
perl -pe 's/\r?\n/,/' bbb
I am using this ruby command but it doesn't work:
ruby -a -ne 'puts $F[0].gsub(/\r?\n/, ";")' bbb
Please help me
+3
source to share