Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Self-reproducing program Message-ID: <1991Mar29.061657.3459@jpl-devvax.jpl.nasa.gov> Date: 29 Mar 91 06:16:57 GMT References: <1991Mar26.210348.12286@uvaarpa.Virginia.EDU> <.c5G=2v91@cs.psu.edu> <1991Mar27.172212.18930@iwarp.intel.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 16 In article jbw@bigbird.bu.edu (Joe Wells) writes: : merlyn@iwarp.intel.com (Randal L. Schwartz) writes: : : seek(DATA,0,0);print__END__ : : Is this guaranteed? Will Larry guarantee that DATA is always open on a : seekable file that contains the entire text of the program? Nope. It doesn't work if you say echo 'seek(DATA,0,0);print__END__' | perl However, it's guaranteed to work if the script is coming from a file. For the moment, that includes when you use -e, because it builds a temp file. Larry