home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!convex!tchrist
- From: tchrist@convex.COM (Tom Christiansen)
- Newsgroups: comp.lang.perl
- Subject: Re: Question on Camel Book
- Message-ID: <1992Sep12.183507.15245@news.eng.convex.com>
- Date: 12 Sep 92 18:35:07 GMT
- References: <48220001@hpscit.sc.hp.com>
- Sender: usenet@news.eng.convex.com (news access account)
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- Organization: Convex Computer Corporation, Colorado Springs, CO
- Lines: 37
- Originator: tchrist@pixel.convex.com
- Nntp-Posting-Host: pixel.convex.com
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
-
- From the keyboard of kc@hpscit.sc.hp.com (Kwok Cheung):
- : I am fairly new on perl and have use awk and sed for
- :a long time. I have a question in regard to the camel book.
- :On p.259 the nfinger program, can any one explain what is the
- :meaning of the following line.
- :
- :exec 'finger', @fingerargs, @finger if @finger;
- :
- :The last part is the one I have problem in trying to understand
- :
- : @finger if @finger
-
- Consider that the exec line is really
-
- exec('finger', @fingerargs, @finger) if @finger;
-
- Meaning run this command if we found anyone to finger.
-
- :when I run it with the full line, it just return with
- :
- :Couldn't run finger:
- :
- :Even I specific the full path to finger '/usr/bin/finger"
- :But when I delete the last 3 word
- :
- :exec 'finger', @fingerargs;
- :
- :The nfinger runs, but I cannot pass on the logon to the program.
-
- I would look at what the list @finger contains: I suspect it's empty.
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- #else /* !STDSTDIO */ /* The big, slow, and stupid way */
- --Larry Wall in str.c from the perl source code
-