home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / perl / 5764 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.9 KB  |  50 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!pdn!bcutter
  3. From: bcutter@pdnis.paradyne.com (Brooks Cutter)
  4. Subject: How to communicate both ways with a sub-process...
  5. Message-ID: <1992Sep8.014546.2605@pdnis.paradyne.com>
  6. Sender: bcutter@paradyne.com
  7. Organization: AT&T Paradyne, Largo Florida
  8. Date: Tue, 8 Sep 92 01:45:46 GMT
  9. Lines: 39
  10.  
  11.  
  12. I looked and looked and looked, but alas I couldn't find any info on
  13. this in the O'Reilly Perl book...  (I'll find the info right after I 
  14. finish this post, I'm sure...)
  15.  
  16.  
  17. I'm looking for a way to open a two-way pipe with a sub-process...
  18.  
  19. I'd like to use this method to open a connection to telnet, ftp, etc.
  20.  
  21. (Yes, I'm aware of ftp.pl and chat2.pl -- However we are on the AT&T R&D
  22. Internet and to get to the REAL internet we have to go through a custom
  23. AT&T Proxy gateway... Rather than convert the constantly evolving library
  24. routines from C, or re-linking perl with the libraries each time, I'd
  25. like to use the telnet/ftp binaries that will be updated as often...
  26. (Yes I've mastered the first great virtue of a programmer...)
  27. I've also had problems with ftp.pl talking to a IBM (ack) Mainframe
  28. running MVS and IBM's TCP/IP Ver 2 Rel 2 -- Talking to ftp rather
  29. than directly to the daemon should solve this problem)
  30.  
  31. So Anyways... Is there a way to open a 2-way pipe or a package that
  32. simulates this?  The only thing I could think of is creating a named
  33. pipe and using that as the output/input for the program...
  34.  
  35. Yes I'm aware of the possibilities of deadlock... However the prompts
  36. are well defined (for ftp at least) and I hope to avoid this...
  37.  
  38. (On a related note: I noticed that ftp attempts to read the password
  39. from the terminal directly - instead of from stdin.  Can I fool ftp
  40. with perl, or will I need to recompile it taking this out?)
  41.  
  42. Thanks...
  43.  
  44.  
  45. -- 
  46. Brooks Cutter    (I: bcutter@pdnis.paradyne.com)
  47.                  (U: ...uunet!pdn!pdnis!bcutter)
  48. Unix System Administrator, Information Services
  49.         AT&T Paradyne, Largo Florida
  50.