suvendra123 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: How the lines will get modified as per value of i
by 1nickt (Canon) on Mar 13, 2021 at 17:54 UTC

    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.

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


      Dave

Re: How the lines will get modified as per value of i
by Marshall (Canon) on Mar 13, 2021 at 19:53 UTC
    I am very skeptical of your problem statement.
    At first, it appears the you want a subset of the input.
    But then it appears that you want extra things added.
    Please clarify.