in reply to sed to perl conversion revisted
For me, the sed script you enclosed does not seem to work. It gives this output given your example input:
Line1 Line2 Line3 Line4 Line5 [download]
I am using GNU sed 3.02.