[Perl] manipular archivos binarios con perl

Rene Morales D. yo@renemorales.cl
Tue, 22 Oct 2002 03:48:33 -0300 (added by postmaster@ctcinternet.cl)


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