while($line = shift @netlist){ chomp $line; if($line =~ ".SUBCKT $runset{SchCell}"{ #OK, where in the right area.. print NET_N "$line\n"; $line = shift @netlist; # Get the next line chomp $line; while($line !~ ".ENDS"){ # If we are at the END stop.. for ($line) { if (($line =~ "*.pininfo") { # Ok I'm here.. Now how do I get this line any other lines # denoted by the "+" into an array } # Now how do I do the search and replace.. for each of the pwrs # and grounds.. } } } }