Hi all
Ok here is what I have..
My text file..
.SUBCKT testblock a b c vdd vcc vss vssa *.PININFO a:I b:I c:I vdd:I vcc:I + vss:G vssa:I RR0 a vss 9.99967K $[PO] XI48 a b c vdd vcc vss vssa / test2block .ENDS
Here is the variables
$runset{"POWER-NODE"}="vdd,vdda,vddb" $runset{"GROUND-NODE"}="vssa"
Now here is what I need for an output
.SUBCKT testblock a b c vdd vcc vss vssa *.PININFO a:I b:I c:I vdd:P vcc:I + vss:I vssa:G RR0 a vss 9.99967K $[PO] XI48 a b c vdd vcc vss vssa / cd_acore_porbuf .ENDS
Here is my code thus far..
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.. } } } }
Am I approaching this correctly.. Can someone help me out.. PLEASE:)

In reply to Search and replace.. ..a bit different by Rhodium

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.