Xref: utzoo comp.unix.questions:19273 comp.lang.perl:191 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.unix.questions,comp.lang.perl Subject: Re: Separator frobs (was Re: regexp question) Message-ID: <6862@jpl-devvax.JPL.NASA.GOV> Date: 22 Jan 90 19:12:16 GMT References: <1307@island.uu.net> <6849@jpl-devvax.JPL.NASA.GOV> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 22 In article schwartz@cs.psu.edu (Scott Schwartz) writes: : Larry writes: : >$/ = "\0"; # line sep is something non-existent : : You know, I've always kind of disliked doing that. Suppose your file : contains all possible byte values 0..255? Something loses. Maybe doing : something like ``undef /;'' to make ``$/'' undefined could be used to : tell perl to just read the whole thing. (Undefined is different from : the null string, right?) Right, though the incantation would be "undef $/;". If you are in that situation, then it's easier just to say read(STDIN, $_, 1000000000); No doubt you'll now complain that you have a file larger than a gigabyte... :-) However, your idea has merit (in particular because the above won't read from <>). In fact, I just implemented it. Thanks. Larry