home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!nstn.ns.ca!dragon.acadiau.ca!merlin!peter
- From: peter@merlin.acadiau.ca (Peter Steele)
- Subject: Re: What's the difference between `command` and system('command')?
- Message-ID: <peter.716216984@merlin>
- Sender: news@dragon.acadiau.ca
- Nntp-Posting-Host: merlin
- Organization: Acadia University
- References: <sasswb.716131013@k2> <1992Sep10.183530.21405@news.eng.convex.com>
- Date: Fri, 11 Sep 1992 13:09:44 GMT
- Lines: 17
-
- >:What the difference between saying `some Unix command` and
- >:system('some Unix command')? Are they synonymous? Are there situations
- >:where one is better than the other?
-
- > `cmd`;
- > $line = `cmd`;
- > @lines = `cmd`;
-
- >returns the output, as it does in the shell. The first form,
- >however, throws it away. system() works much (although not
- >quite exactly) as it does in C.
-
- Where does error output go (i.e., stderr)? I have an application
- where I want to capture error output, not stdout.
- --
- Peter Steele Unix Services Manager peter.steele@acadiau.ca
- Acadia Univ., Wolfville, NS, Canada B0P 1X0 902-542-2201 Fax: 902-542-4364
-