Hello All: I have a file with the following syntax in some_1.xyz
module some_1 {
INPUT PINS
OUTPUT PINS
}
and I want to insert APPLY DELAYS xx and APPLY LOADS ld after line module some_1 {
The following code works fine for just one file i.e., if I replace some_1.xyz to *.xyz then the script doesn't work. I tried introducing sleep(xx) but the code doesn't work for multiple files and I could not figure out why it isn't working. Any pointers is appreciated. Thanks
@modulename_array = `grep "module " some_1.xyz | cut -f 2 -d ' '`;
@line = `grep "module " some_1.xyz`;
chomp(@line);
chomp(@kfarray);
$i = 0;
foreach (@modulename_array) {
print "Applying delay and load to $_.xyz $line[$i] \n";
`perl -ni -le 'print; print "\tAPPLY DELAY xx \n \tAPPLY LOADS ld\n" if/$line[$i]/' $_.xyz`;
$i++;
#sleep(3);
}