This is the basic idea of what I'd do:
...or, from the command linemy $count = 0; while (<IN>) { s/^"\d+"$/'"' . ++$count . '"'/e; print OUT; }
The one-liner puts the original file in myfile.bak.% perl -i.bak -pe 's/^"\d+"$/q(").++$count.q(")/e' myfile
the lowliest monk
In reply to Re: Re-ordering data in data file
by tlm
in thread Re-ordering data in data file
by Lhamo_rin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |