perlquestion
jinism
<p>Dear Monks,</p>
<p>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.</p>
<p>An example of the vectors looks like this:</p>
<p><i>0 1:120.000000 2:0.000000 3:120.000000 4:262.000000 5:120.000000 6:349.000000</i></p>
<p>Every line starts with 0, and i would like to replace that 0 with 1</p>
<p>I have around 100 of these lines in my file and any help would be greatly appreciated!</p>