On Wed, Mar 15, 2000 at 11:32:42PM +0000, Fergal Daly wrote: > fergal@zeus:~> perl -e 'open(FILE, "conc");read(FILE, $file, 1e10);print $file' > Negative length at -e line 1. > > > and file conc is only 748 bytes. It looks like it tries to allocate a > buffer big enough before doing it, Looks like it. Here's something even more fun: $ perl-devel -wle 'open(FILE, "/usr/share/dict/words"); read(FILE, $buf, 1e10) or die $!; print $buf' Out of memory during "large" request for -2147479552 bytes at -e line 1. That's 5.6 RC1 compiled under Linux with 64 bit and large file support. -- Michael G Schwern http://www.pobox.com/~schwern/ schwern@pobox.com I'm successful because I'm lucky. The harder I work, the luckier I get. ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe