Please do pardon me if my question sounds a bit awkward. I am looking for a regex which will replace line numbers in perl source file without affecting values assigned to scalars.
I think below will make my question a little bit clearer. Say I have a perl source which looks like this:
1. $foo = 2.4;
2. print $foo;
I would like a regular expression to replace those line numbers (1. 2. etc..) without affecting value assigned to scalars, and so in this case $foo.
Thanks
s/^\d//;will remove all numbers only at the start of a line.