Hi,

maybe i'm using the wrong module, but that is why i'm here asking.
I have downloaded a message with an jpg attachment fine.
But what i want to learn is that we have in the attachment the ugly code.
So I'm on my windows system i have that code and want to change it back to a
picture.
here is what i have


#!/usr/bin/perl

use MIME::Base64;

$str= qq(
/9j/4AAQSkZJRgABAgEASABIAAD/wAARCAEhAPoDASIAAhEBAxEB/9sAhAAFAwMEAwMFBAQEBQUF
BgcNCAcHBwcQCwwJDRMQFBMSEBISFRceGRUWHBYSEhojGhwfICEiIRQZJSckICceISEgAQUFBQcG
bpnh3nfK/PmH1x0C+g7V3/x7+Iz6tdS21pKyrJmFD1CRg8t/wI4rw+WeOOI7GVx0JPc+9deHp3fN
);


my $decoded = decode_base64($str);
my $filename= "test.jpg";
open(F,"> C:\\attach\\$filename");
my $buf;
while(read($decoded,$buf,1024)) {
print F $buf;
}

close(F);
print "LET SEE INT C:\\attach";

any help is appreciated



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to