home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!utcsri!eecg.toronto.edu!zq
- Newsgroups: comp.lang.perl
- From: zq@eecg.toronto.edu (Qing Zheng)
- Subject: Problem with pipe
- Message-ID: <1992Aug31.182643.12963@jarvis.csri.toronto.edu>
- Date: 31 Aug 92 22:26:43 GMT
- Lines: 27
-
- #! /local/bin/perl
- #
- # This is my own lpr command mylpr
- #
- #doing something that I want.
- .....
- # execute the real lpr
- exec '/usr/ucb/lpr', @ARGV;
-
- If I issue the following command
-
- %mylpr file
-
- everthing is ok. However, when I issue
-
- %cat file |mylpr
-
- the print out is not correct. I guess the problem is that the pipe is not
- properly passed over to the "exec '/usr/ucb/lpr', @ARGV" since some lines of
- the initial part of the file is missing. Any idea on how to solve this problem?
-
- Thanks in advance.
-
- Please send mail to zq@eecg.toronto.edu
-
- ---Qing
-
-