Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!uunet!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: formatting to memory Message-ID: <1991Feb18.173124.12994@convex.com> Date: 18 Feb 91 17:31:24 GMT References: <1991Feb18.171601.1847@agate.berkeley.edu> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 21 Nntp-Posting-Host: pixel.convex.com From the keyboard of raymond@math.berkeley.edu (Raymond Chen): :I'd find it useful to be able to save the output of a write() into a :variable rather than sending it to the output channel. ... :I wonder whether anybody else has wished for this facility. Yes, this would fix my trailing newline problem. chop($foo = swrite(fmt)); One snag I can foresee is that formats are bounds to filehandles. Maybe swrite() should just take an unadorned format name (or indirect one through a scalar). I see on Larry's wishlist to make format pictures niftier; besides animation :-), what else can we come up with? --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "All things are possible, but not all expedient." (in life, UNIX, and perl)