in reply to Looking for help with decryption in Spreadsheet::ParseExcel

Comes down to something I'd like to see support for in perl: unpack on streams. So you could rewrite

while (read $fh, my $dta, 4) { my ($name, $len) = unpack "vv", $dta; read $fh, $dta, $len; $encrypted and $dta = decrypt $dta; :

to

while (my ($name, $dta) = unpack "vv/A*", $fh) { $encrypted and $dta = decrypt $dta; :

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Looking for help with decryption in Spreadsheet::ParseExcel
by Corion (Patriarch) on Jan 22, 2010 at 13:38 UTC

    That's a great idea, but I'm not sure how this would relate to $/. I think it should always ignore $/, as the filehandle is "obviously" something that doesn't fit into the usual scheme of fixed-width or delimited records. But other than that, it would be nice to teach unpack about streams indeed.