Troy May wrote:
> 
> Hello,

Hello,

> How do you write to the beginning of a file?  I see only 3 options to open a
> file:  to read, to overwrite, and to append to the end of the file.
> 
> I tried seeking to the beginning before the write, but it doesn't work.
> Seek must only work for a read.
> 
> Any ideas?


perl -pi -e's/^/Put this at the beginning\n/ if $. == 1' yourfile.txt



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to