jinism has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I am relatively new to perl and would like to request for a code that would enable me to change the first number of a line of vectors for all lines in the txt file.
An example of the vectors looks like this:
0 1:120.000000 2:0.000000 3:120.000000 4:262.000000 5:120.000000 6:349.000000
Every line starts with 0, and i would like to replace that 0 with 1
I have around 100 of these lines in my file and any help would be greatly appreciated!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: changing the first number of every line
by roboticus (Chancellor) on Nov 21, 2012 at 13:15 UTC | |
Re: changing the first number of every line
by choroba (Cardinal) on Nov 21, 2012 at 13:14 UTC | |
Re: changing the first number of every line
by ww (Archbishop) on Nov 21, 2012 at 14:58 UTC |
Back to
Seekers of Perl Wisdom