On 12/07/2013 13:44, Agnello George wrote:
hi
i have raw data that is like this in a flat file .
start
name:agnello
dob:2 april
address:123 street
end
start
name:babit
dob:13 april
address:3 street
end
start
name:ganesh
dob:1 april
address:23 street
end
i need to get the data in the following format
name:agnello, dob:23 april ,address:123 street
name:babit,dob:13 april,address:3 street
name:ganesh,dob:1 april,address:23 street
perl -0 -wple 's/^start\n(.*?)\nend\n/$_=$1;y{\n}{ };"$_\n"/emgs'
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/