in reply to Add Contents At last in a File

You may find useful the lexical scope of file handle:
... { open my $rh, "./read_file" or die $!; open my $wh, ">> ./write_file" or die $!; print $wh $_ while <$rh> } ...