home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!Sirius.dfn.de!chx400!bernina!neptune!weingart
- From: weingart@inf.ethz.ch (Tobias Weingartner)
- Subject: open - Does it use the shell?
- Message-ID: <1992Jul27.100134.20233@neptune.inf.ethz.ch>
- Followup-To: comp.lang.perl
- Keywords: open, shell
- Sender: news@neptune.inf.ethz.ch (Mr News)
- Nntp-Posting-Host: tau.inf.ethz.ch
- Reply-To: weingart@inf.ethz.ch
- Organization: ETH - Switzerland
- Date: Mon, 27 Jul 1992 10:01:34 GMT
- Lines: 21
-
- Yo, perl dudes and dudettes!
-
- I have a small perl script, which amounts to roughly:
-
- $args = join(' ', @ARGV);
- $prog = './someperlprog';
- open(FOOBAR, "$prog $args -xxx -xxx |");
- chop( @DATA = <FOOBAR> );
- foreach $i (@DATA){
- ...
- }
-
- Ok, the prob is this, the open seems to invoke the
- shell. Yes, there are meta-chars in $args, but $prog
- exists. Does open always invoke the shell on meta chars?
-
- There has got to be a better way than to doubly escape,
- or quote everything.
-
- --Toby.
-
-