elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 09:17  


Tema destacado: Recuperar cuenta de Google, GMail, Youtube

+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting (Moderadores: Novlucker, Leo Gutiérrez., EleKtro H@cker)
| | |-+  [Perl] Funcion savefile()
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] Funcion savefile()  (Leído 250 veces)
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
[Perl] Funcion savefile()
« en: 11 Octubre 2011, 18:10 »

Hola , con esta funcion podran crear un archivo y escribir en el , Si el archivo ya existe solo escribe y no lo borra


Código
#By Doddy H
sub savefile {
open (SAVE,">>".$_[0]);
print SAVE $_[1];
close SAVE;
}


Ejemplo de uso


Código
savefile("C:\\Windows\\Logs\\file.txt","hola")
 


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Funcion Ip Publica [Perl]
Scripting
isseu 2 1,239 Último mensaje 8 Mayo 2010, 00:17
por Leo Gutiérrez.
[Perl] Funcion movewin()
Scripting
Doddy 0 116 Último mensaje 11 Octubre 2011, 18:08
por Doddy
[Perl] Funcion killprocess()
Scripting
Doddy 0 149 Último mensaje 11 Octubre 2011, 18:09
por Doddy
[Perl] Funcion printear()
Scripting
Doddy 0 397 Último mensaje 11 Octubre 2011, 18:10
por Doddy
[Ruby] Funcion savefile()
Scripting
Doddy 0 91 Último mensaje 10 Febrero 2012, 21:02
por Doddy
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines