in reply to Re: Re: Copying a file to more than one separate directory and/or file
in thread Copying a file to more than one separate directory and/or file
This line:
foreach my $fd( keys %fd ) {
should be:
foreach my $fd( values %fd ) {
and instead of reading it in line by line, it would be more efficient just to read a chunk of it at a time so instead of
while( <IN> ) {
use
while( read(IN, $_, 4096) ) {