Title: RE: Append to file

Rather than a system call use the Perl internal I/O functions:

open FILE, ">>c:/path/to/file/Serv-u.ini";

print FILE '
[USER=jukeboxes]
Password=qc6mddxhLVSck
HomeDir=e:\hosting\jukeboxes
TimeOut=45
QuotaEnable=YES
QuotaMaxCurrent=20480000,0
Access1=e:\hosting\datasources\jukeboxes,RWAMCDLP
Access2=e:\hosting\jukeboxes,RWAMCDLP';

close FILE;

Hope this helps.

Trevor J. Joerges
<http://members.home.net/tjoerges>
________________________________
$_=q;$TTnzyUUifyIIz!;;s;z;xdl;g;
y;x;b;;y;B-x;A-w;s;y;y; ;;print;
________________________________


-----Original Message-----
From: PerlWin32 [mailto:[EMAIL PROTECTED]]
Sent: March 12, 2001 07:19 PM
To: 'Win32 Perl Admin ActiveState LS (E-mail)'
Subject: Append to file


Hi

I am having trouble appending the text below to a file.

I have no trouble appending one or two words, however I would  like the
following
block of text and in the exact same format below:

Do I need to enclose the whole block in quotes or something?

system("echo hello >> Serv-u.ini");

How about the whole block below?

[USER=jukeboxes]
Password=qc6mddxhLVSck
HomeDir=e:\hosting\jukeboxes
TimeOut=45
QuotaEnable=YES
QuotaMaxCurrent=20480000,0
Access1=e:\hosting\datasources\jukeboxes,RWAMCDLP
Access2=e:\hosting\jukeboxes,RWAMCDLP

Thanks

Tony

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to