in reply to Search and replace.. ..a bit different
Sorry, but it's entirely unclear to me how your input transforms to your output under those variables. It looks like you're trying to cook up a wiring control or some such from a netlist, but I'm not familiar with the format.
Some general comments that may help:
and the @blocks array will contain the chunks of the file (with newlines embedded) that were separated by that symbol.{ local $/ = '.ENDS'; @blocks = <INPUT>; #or whatever }
|
|---|