Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!uunet!rufus!singer@ibm.com From: singer@ibm.com (David Singer) Newsgroups: comp.lang.perl Subject: Re: -T and named pipes Message-ID: <527@rufus.UUCP> Date: 19 Feb 91 00:05:30 GMT References: <521@rufus.UUCP> <11483@jpl-devvax.JPL.NASA.GOV> Sender: news@rufus.UUCP Reply-To: singer@ibm.com (David Singer) Organization: IBM Almaden Research Center Lines: 22 Summary: Expires: Sender: Followup-To: In article <11483@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: > >That would be fascist. What if you want to use -T or -B to find out whether >a pipe is returning text or binary data? Is it possible for the nature of the data being returned to change from text to binary and back again? And wouldn't reading data from the pipe consume it (or is it possible to reread the first part)? > >Better would be to hide the -T/B behind a !-p, in my hubristic opinion. After I figured out what was hanging up the script, I did modify it to skip pipes (hey, it was only the second perl program I'd typed in!). I was just surprised to have an example from the book act so strangely. I freely admit I'm a Perl novice and pretty much a rookie at Unix in general. -- David Singer -- Internet: singer@ibm.com BITNET: SINGER at ALMADEN Voice: (408) 927-2509 Fax: (408) 927-4073 (amusing disclaimer du jour goes here)