I'll try to use Tie::File
use Tie::File; #.......your code #at this point you have #@ports with port numbers #and file address.txt which you need to append tie @addresses, 'Tie::File', "address.txt" or die $!; for my $position (0..$#ports) { $addresses[$position] .= $ports[$position]; } untie @addresses;
But you may combine reading of the ports file and updating addresses file (with $. magick).
In reply to Re: Need a little help appending lines
by Gangabass
in thread Need a little help appending lines
by perl4ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |