in reply to Loop Through Files and Update Headers
G'day jalopez453,
As has already been mentioned, you've some problems in your code. Another, is "untie @array" inside the for loop: indenting your code probably would have made that more obvious.
If you have a different number of new headers than what was there originally, consider using splice. Here's a quick example:
$ perl -E ' my @x = qw{H-old ...}; say for @x; splice @x, 0, 1, qw{H-new1 H-new2}; say for @x; ' H-old ... H-new1 H-new2 ...
— Ken
|
|---|