如何将文件附加到文件 [英] How to append file to the file

查看:109
本文介绍了如何将文件附加到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我需要将临时文件的内容附加到另一个输出文件,尝试复制,但它不起作用。我不能直接打印到输出文件中,因为我需要首先检查temp的内容。

我也尝试使用数组而不是临时文件,但打印数组到INFO文件给了我一行转移。


非常感谢帮助:

------------------------ --------------------

Hi,

I need to append a contents of the temp file to another output file, tried copy, but it doesn''t work. I can''t directly print into the output file as I need to check contents of temp first.
I also tried to work with arrays instead of temp file, but printing array into INFO file gives me line shifting.

Will appreciate help:
--------------------------------------------

展开 | 选择 | Wrap | 行号

推荐答案

欢迎来到TSDN !!!

首先,请知道我已编辑您的帖子,以便在您的代码周围添加代码标签。请确保将它们添加到您的帖子中,围绕您的代码,以便将来发布任何代码。


接下来,就您正在处理的文件而言,我理解你想将它们组合成一个文件。你是否担心重复?那是你想要检查的吗?另外,你在做什么操作系统?


问候,


杰夫
Welcome to TSDN!!!

First, please know that I have edited your post to add code tags around your code. Please be sure and add them to your post, around your code, for any future code postings.

Next, as far as the file(s) you are dealing with, I understand that you want to combine them into one file. Are you worried about duplicates? Is that what you are wanting to check for? Also, what operating system are you working on?

Regards,

Jeff





我不关心重复,在循环处理期间我正在收集一些信息到temp,然后将这些信息存储到INFO后我会清理它。

我在W''XP上使用Active Perl。


Tx

Vic
Hi,

I don''t care about dups, during the loop processing I''m collecting some info into temp, then after storing this info into INFO I''ll clean it up.
I''m using Active Perl on W''XP.

Tx
Vic

好吧,如果是这样,为什么不这样做:

Well, if that is the case, why not do something like this:

展开 | 选择 | Wrap | 行号


这篇关于如何将文件附加到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆