Path: utzoo!attcan!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!sp1.csrd.uiuc.edu!kai From: kai@sp1.csrd.uiuc.edu (Kuck And Associates) Newsgroups: comp.lang.perl Subject: Re: Problem piping binary data Message-ID: <1990Jul17.225920.17571@csrd.uiuc.edu> Date: 17 Jul 90 22:59:20 GMT References: <8120@pitt.UUCP> Sender: usenet@csrd.uiuc.edu (news) Organization: UIUC Center for Supercomputing Research and Development Lines: 24 al@ee.pitt.edu (Alan Martello) writes: >Why doesn't this work and how can it be modified to work? >while() >{ > printf OUTFH $line; > read(TMPFH, $line, $length); >} You're reading two lines at a time (the implied read in the "" statement, and the read command), and only printing the second. How about: while (! eof(TMPFH)) { read (TMPFH, $line, 4096); print OUTFH $line; } Patrick Wolfe (pat@kai.com, kailand!pat) System Programmer/Operations Manager, Kuck & Associates "Any opinions expressed are my own, not my employers's. Please don't call my boss and complain ... again."