Anyone with any experiences that they would like to share:

I've put together a script that suppose to download a file and save it onto
the server's harddisk. Only problem is that when I write it out to the
location and filename I want, it gets corrupted. It seems to be adding bytes
to the size of the file if I compare the source file with the output file.
Here's the fragment of code that should save the file:

$file = param( 'filename' ); #using CGI.pm
if ( !$file ) { die "Must have a file" }
else { $file = /.*[\\|\/](.*)\.(jpg|gif|png)/gi;
         $flName = "$1.$2";
}
open( IMAGE, "> $flName" ) or die "Cannot open file to save";
print IMAGE <$file>;
close IMAGE;

It does download the file and replace any existing files, but each time the
source file is about 100 kb less than the output. I've tried using read(),
but that for some reason starts an endless loop on Win2k DLLHOST.EXE. I used
several other tricks from the CGI.pm book, as well as other sources, but
still no luck.

Scott Anderson
President/Webmaster
http://www.weekendclimber.com
[EMAIL PROTECTED]
--------------------------------------------
@_=map{[$!++,$_^$/]}split$�,"\@\x7Fy~*kde~box*Zoxf*Bkiaox";$\="\r";
$|=++$*;do{($#,$=)=(rand@_,rand@_);@_[$#,$=]=@_[$=,$#]}for($*..@_);
for$:($|..@_-$|){for($|..@_-$:){@_[$_-$|,$_]=@_[$_=>$_-$*]if$_[$_][
$�]<$_[$_-$*][$�];print+map{$_->[$|]}@_;select$�,$�,$�,0.1}}print$/

---------------------------------------------
Introducing NetZero Long Distance
1st month Free!
Sign up today at: www.netzerolongdistance.com

____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] 
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to