• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Perl [Perl] Funcion savefile()

Status
Not open for further replies.

Doddy

Leech
User
Joined
Apr 1, 2012
Messages
169
Reputation
0
Reaction score
406
Points
63
Credits
0
‎13 Years of Service‎
57%
Hola , con esta funcion podran crear un archivo y escribir en el , si el archivo ya existe solo escribe y no lo borra

Code:
>
#By Doddy H
sub savefile {
open (SAVE,">>".$_[0]);
print SAVE $_[1];
close SAVE; 
}
Ejemplo de uso

Code:
>
savefile("C:\\Windows\\Logs\\file.txt","hola")
 
Status
Not open for further replies.
Back
Top