in reply to Re: Add a line to the end of a file
in thread Add a line to the end of a file

I also don't think that there is a better way to do it.

How about just:

echo 'stuff' >> file.txt

This will be much faster and use buckets less memory than firing up a full blown perl interpretter. Works on Win32 or *nix. It's shorter. Better? Depends what you need.... As always YMMV.

C:\>echo Hello World! > better C:\>date /T >> better C:\>type better Hello World! Tue 17/02/2004 C:\>

cheers

tachyon

Replies are listed 'Best First'.
Re: Re: Re: Add a line to the end of a file
by Skeeve (Parson) on Feb 18, 2004 at 14:02 UTC
    Did he say the appending to the log is the only thing his script does? Nope, he didn't. So as usualy I'd assume that this logging is just a part of a more complex perl script. An echo wouldn't be of much use, don't you aggree?

    Update (at -1): Yes! Come on! Downvote me! Hey! What's wrong with this! Please explain...