How do I find numbers in a line and multiply it by 1000, the numbers could be floating
eg:
create_clock -name "CLKBLK" -period 64.000 -waveform {0 32}
I want to change this to
create_clock -name "CLKBLK" -period 64000 -waveform {0 32000}
Is there in perl to do a pattern match for a number. I...
Sorry, I may have over simplified the problem..
What I do have is a hash and I need to install the 2 values in the hash after line x depending on the if condition below. The code I have so far.
open (OUT, "+<$out_file") || die "Cannot open output.txt";
while (defined ($line = <OUT>)) {...
I'm trying to read and write to a file at the same time.
I used open ( FILE, +<$file_name) to make $file_name both readable and writeable.
I basically want to replace
x
y
z
in the file
with
x
a
y
z
When I tried doing this with an algorithm that works like this
if $line = /x/
print FILE a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.