Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: ***WARNING PERL NOVICE ALERT*** Message-ID: <1991Jun01.143505.22018@convex.com> Date: 1 Jun 91 14:35:05 GMT References: Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Distribution: comp Organization: CONVEX Software Development, Richardson, TX Lines: 35 Nntp-Posting-Host: pixel.convex.com From the keyboard of hogan@csl.sri.com (Emmett Hogan): :1) I am using two formats, one for the data and the "top" format. My : problem is that if I do the "write" to STDOUT, everything is fine : and dandy, but if I do a write to a file, I lose the first line of : data, but the headers print out just fine. Well, it's a bit hard to know quite what's up without seeing the source, but here's a stab. Are you properly selecting the right format for the other filehandle? For example, if you have done this format STDOUT = . Then it will use this for write()s to STDOUT, but if you switch to another handle, you'll need to set $~ to the format you want (or else name the format the same as that filehandle). :2) Is there any way to prompt the user for input, plus have the : program accept data from STDIN? I know it's a long shot, but what : I would like to be able to do is: : : % quot | quot-report.pl : Detailed Report [y/n]? <---- this is a prompt from my program : : In C I believe I would be able to open /dev/tty for input, can I do : this in PERL? Sure, just say open(TTY, "