Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!decwrl!orc!mipos3!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: Re: = @array? Message-ID: <1990Feb23.190121.2591@iwarp.intel.com> Date: 23 Feb 90 19:01:21 GMT References: <15193@bfmny0.UU.NET> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 45 In-Reply-To: tneff@bfmny0.UU.NET (Tom Neff) In article <15193@bfmny0.UU.NET>, tneff@bfmny0 (Tom Neff) writes: | Why not allow the inverse of the usage | | @array = ; | | which fills @array with all the lines from the open stream , | and allow | | = @array; | | which would write all the elements of @array to the open stream . | You can do this now with print and foreach or join, but the symmetry | would still be nice. yeah, yeah, and then you could say: = to copy a file! Nifty! Just kidding. What I really meant to say is that this is starting to look like creaping featurism. I vote no, especially if it'll delay "Patch 9 from outer space". I mean, what's wrong with: print FILE @array; and print FILE1 ; for both of those? Nothing! What *I'd* really like is a call like `cat file` that gives me the whole file in one fell swoop without having to start a process. I'd also like to capture the output of "write" into a string so I could do further processing, rather than having to write it to a temp file (yeah, I came up with a need for this the other day, but worked around it instead). But what I'd *really* like is Patch 9. :-) format STDOUT = @<<< @<<<<<< @<<< @<<<<<, $Just, $another, $Perl, $hacker . for("Just","another","Perl","hacker"){eval"\$$_=\$_;";};write; -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/