jujiro_eb has asked for the wisdom of the Perl Monks concerning the following question:
Need your help again.
I am trying to decode a large mime encoded file using MIME::Base64. I am not getting the original file back. The file is getting corrupted when decoded. I am using the following code.
Can you please give me some pointers. Loading the entire file into a string variable and decoding it is out of question here because I have limited memory on this notebook.use strict; my $file_name=$ARGV[$0]; my $buf; use MIME::Base64; open(FILE, $file_name); while ($buf = <FILE>) { print MIME::Base64::decode($buf); }
As usual, thanks so much for the help.
Ash
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help: Mime decoding of a large file
by Gangabass (Vicar) on Apr 16, 2009 at 06:00 UTC | |
by jujiro_eb (Sexton) on Apr 16, 2009 at 12:50 UTC | |
by almut (Canon) on Apr 16, 2009 at 13:01 UTC | |
by ww (Archbishop) on Apr 16, 2009 at 13:02 UTC | |
by jujiro_eb (Sexton) on Apr 16, 2009 at 13:13 UTC | |
by zwon (Abbot) on Apr 16, 2009 at 18:24 UTC | |
| |
|
Re: Help: Mime decoding of a large file
by almut (Canon) on Apr 16, 2009 at 03:03 UTC |