[Perl] Re: manipular archivos binarios con perl

Mauricio Herrera Cuadra arareko@yahoo.com
Tue, 22 Oct 2002 13:13:42 -0500 (CDT)


Espero haber entendido tu pregunta, ojala que esto te sirva...

http://194.106.118.30/ftp/Docs/Internet/Perl%205%20in%2021%20days/ch12.htm#ReadingaBinaryFileUsingTTFONTSIZEbinmodeFONTTT

> From: yo@renemorales.cl (Rene Morales D.)
> Subject: [Perl] manipular archivos binarios con perl
> 
> Sres:
> 
> seg=FAn este script obtenido de la info. de "CGI.pod"
> que ejecute en mi m=E1quina, y me genero este.swf
> pero valia hongo, ya estaba da=F1ado.
> lo mismo ejecutado en el servidor.
> 
> #!/usr/bin/perl
> use CGI qw(:standard);
> $subirfile=3D"iso.swf"; # .swf, archivo flash
> $este=3D"este.swf";
>  open (OUTFILE,">>$este");
>         while ($bytesread=3Dread($subirfile,$buffer,1024)) {
>            print OUTFILE $buffer;
> }
> 
> y de acuerdo a la definici=F3n que se hace aqu=ED abajo
> 
> If you are using a machine that recognizes "text" and "binary" data
> modes,
> be sure to understand when and how to use them (see the Camel book).
> Otherwise you may find that binary files are corrupted during file
> uploads.
> 
> 1. no tengo el libro del camello
> =BFalguna url para entender como perl puede manejar archivos binarios?
> 
> parece que tiene que ver con librer=EDas. =BFo no?
> 
> esono+
> 
> 
> #-------------------------
> Ren=E9 Morales Duarte
> Dise=F1adorGr=E1fico | ProgramadorWeb
> Make it whit MacPerl

=====
MAURICIO HERRERA CUADRA
arareko@yahoo.com
http://www.geocities.com/arareko/

_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx