in reply to $. Input line number
Another thing, if your file is only 100 lines long, you know that it's not going to grow by much ever, and you're trying to perform operations on records, it might be helpful to use the Tie::File module along with the 'recsep' configuration option like this:
tie my @array, 'Tie::File', $filename, recsep => '# input for ';
This will cause individual records to be read into an array, and any modifications you perform on the array's elements will be echoed back into the file. That might simplify your script enough that the remainder of the script's file logic will wax trivial.
Hope this helps!
Dave
|
|---|