On Wed, 30 Jun 1999, Vicki Brown wrote: > This one isn't very technical, so the "I'm new to Perl" folks can play I'm not new to Perl, so I won't give the answer. But I'm also not a full guru... > From the MacPerl list a while back > > > This code gives me an out of memory error > > print "Please select a file to view: "; > chomp($file_name = <STDIN>); > > open(FILE, "$file_name"); > @newsgroups = <FILE>; > print @newsgroups; > close FILE; It strikes me that there should be a fun way to mmap the file. "man perlipc" says you can't mmap to $strings because the garbage collector might try do nasty things to it. (Hmm. Does it really have to? Couldn't it just have a bit flag saying "I'm mmap'd don't collect me"? I don't know, I haven't peered into the gurgling bowels of perl.) I see you can mmap PDL's, (PDL::IO::FastRaw::mapfraw) but you have to construct a .hdr file for it. Thus presumably you can mmap somehow without a .hdr file by doing whatever they do in the murky depths of PDL::IO::FastRaw.pm Anybody ever done this? John Carter EMail: ece@dwaf-hri.pwv.gov.za Telephone : 27-12-808-0374x194 Fax:- 27-12-808-0338 <http://www.geocities.com/SoHo/Cafe/5947> or <http://iwqs.pwv.gov.za> >From too much love of living, From hope and fear set free... ==== Want to unsubscribe from Fun With Perl? ==== Well, if you insist... Send mail with body "unsubscribe" to ==== fwp-request@technofile.org