Rhodium has asked for the wisdom of the Perl Monks concerning the following question:
Yesterday I think I asked a a bit more than what I should have. Since then I have broken down the problem considerably, and here is where I'm at.
I have some variables that I need to modify then replace. They are
Now I have a line in a text file that I want to modify$runset{"POWER-NODE"}="vdd,vdda"; $runset{"GROUND-NODE"}="vssa,vss";
The rules are simple$line = "*.PIN foo:I bar:O vdd:I vssq:I vssa:O";
$line = "*.PIN foo:I bar:O vdd:P vssq:I vssa:O";
Notice that only those variables that exist in both $line and $runset{pwr/gnd} were changed. Also I don't want to actually change the $runset variables only temporarily modify them.$line = "*.PIN foo:I bar:O vdd:P vssq:I vssa:G";
I hope this is simpler to understand. I think this isn't tough but I am really stuck on this thing..
Any help would be very much appreciated. Thanks to every one so far that has tried to read through my kludge and help me out
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple replacement - only if they exist..
by PrakashK (Pilgrim) on Apr 11, 2002 at 17:46 UTC | |
|
Re: Simple replacement - only if they exist..
by sfink (Deacon) on Apr 11, 2002 at 17:38 UTC | |
|
Re: Simple replacement - only if they exist..
by erikharrison (Deacon) on Apr 11, 2002 at 17:58 UTC |