[Israel.pm] perl -i -pe question
avishalom at gmail.com
Sun Feb 19 23:40:19 PST 2012
because you are setting it to 1 every line
better yet , why not use $. ?
this is the current line
On 20 February 2012 07:33, Dov Levenglick <dov.levenglick at gmail.com> wrote:
> Why isn't $a incrementing in this one-liner:
> perl -ibak -pe "$a=1; $a++ if (s/ ADDR_RESET_PAIR/ $a
> ADDR_RESET_PAIR/);" file.txt
> Running this on Win7 (This is perl, v5.6.1 built for
> I know it's an antiquated version of Perl, but it's what the company uses.
> Best Regards,
> Dov Levenglick
> Perl mailing list
> Perl at perl.org.il
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Perl