Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!bfmny0!tneff From: tneff@bfmny0.BFM.COM (Tom Neff) Newsgroups: comp.lang.perl Subject: Re: Reading a file into a string Message-ID: <97130172@bfmny0.BFM.COM> Date: 30 Jan 91 08:25:49 GMT References: <5231@taux01.nsc.com> <1991Jan30.005821.13013@convex.com> Reply-To: tneff@bfmny0.BFM.COM (Tom Neff) Lines: 12 In article <1991Jan30.005821.13013@convex.com> tchrist@convex.COM (Tom Christiansen) writes: >1) $foo = `cat $file`; > >2) open (FILE, $file); > undef $/; > $foo = ; > close(FILE); 3) open (FILE, $file); $foo = ''; while (!eof(FILE)) { read(FILE, $x, 32767); $foo .= $x;}; You can use bigger numbers than 32767...