home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / perl / 7018 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.0 KB  |  32 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!panther!mothost!merlin.dev.cdx.mot.com!fendahl.dev.cdx.mot.com!mcook
  3. From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
  4. Subject: Re: Calling a text editor from Perl
  5. Message-ID: <mcook.722017794@fendahl.dev.cdx.mot.com>
  6. Sender: news@merlin.dev.cdx.mot.com (USENET News System)
  7. Nntp-Posting-Host: fendahl.dev.cdx.mot.com
  8. Organization: Motorola Codex, Canton, Massachusetts
  9. References: <Bxtyon.H0x@cs.uiuc.edu>
  10. Date: Tue, 17 Nov 1992 16:29:54 GMT
  11. Lines: 19
  12.  
  13. schwager@cs.uiuc.edu writes:
  14.  
  15. >Hi,
  16. >Is it possible to call a text editor from Perl?  I want to do something
  17. >like this:
  18. >        `/usr/ucb/vi /tmp/addgr$$`;
  19. >but it looks like the terminal i/o is not working properly, so it just
  20. >hangs at that statement.  Afterwards I have to reset my terminal, so I'm sure
  21. >it's scrogged somehow.  Thanks for any help.  I'd hate to have to go back to
  22. >using csh.
  23.  
  24. Do this, instead:
  25.  
  26.     system("/usr/ucb/vi /tmp/addgr$$");
  27.  
  28. Backquoting captures the output, which means that vi isn't allowed to update
  29. your display.
  30.  
  31. Michael.
  32.