in reply to How the lines will get modified as per value of i

So you took the code davido showed in Re: Unable to write the .sv file and added

my $first = $1; if (my ($tail) = $line =~ /^\.march_endSP)(.*)/) { print(".rs_$_$tail\n") for 1..$first; } else { print($line); }
What did you expect that code to do, and what is it actually doing?


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: How the lines will get modified as per value of i
by davido (Cardinal) on Mar 13, 2021 at 21:36 UTC

    I'm realizing this is an entitled, zero-effort person.


    Dave