home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!news.cerf.net!netlabs!lwall
- From: lwall@netlabs.com (Larry Wall)
- Subject: Re: Is this a perl bug?
- Message-ID: <1992Dec14.175649.22784@netlabs.com>
- Sender: news@netlabs.com
- Nntp-Posting-Host: scalpel.netlabs.com
- Organization: NetLabs, Inc.
- References: <9212111642.AA27958@brimstone.unipalm.co.uk> <1992Dec12.072651.653@netlabs.com> <mcook.724207619@fendahl.dev.cdx.mot.com>
- Date: Mon, 14 Dec 1992 17:56:49 GMT
- Lines: 32
-
- In article <mcook.724207619@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
- : lwall@netlabs.com (Larry Wall) writes:
- :
- : >Similarly, `cat $foo` turns into something like backtick('cat ' . $foo),
- : >though I haven't actually put in a keyword to access that function yet.
- :
- : Cool. Would we be able to do something like this: backtick('cat',$foo), which
- : would be analogous to system('cat',$foo) vs. system("cat $foo")?
-
- At the moment the new internal functions like backtick(), uc(), and
- glob() are unary operators, but I'll think about it some.
-
- : And how about having it so the file name in open() can be separated from the
- : directive characters: open(FH,">",$foo). That way, it would still work even
- : if the file name had funny characters (such as leading/trailing whitespace).
-
- There might be a 3-arg sysopen, if I get around to it.
-
- : And open(FH,"|-",'cat',$foo) could be like open(FH,"|cat $foo"), except that
- : it would be done directly via exec, not via "sh -c".
-
- I don't see the point, when
-
- open(FH, "|-") || exec 'cat', $foo;
-
- does the same thing. In fact, so does
-
- open(FH, "|cat $foo");
-
- as long as $foo contains no shell metacharacters.
-
- Larry
-