home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / perl / 5891 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.8 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!convex!tchrist
  2. From: tchrist@convex.COM (Tom Christiansen)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: Question on Camel Book
  5. Message-ID: <1992Sep12.183507.15245@news.eng.convex.com>
  6. Date: 12 Sep 92 18:35:07 GMT
  7. References: <48220001@hpscit.sc.hp.com>
  8. Sender: usenet@news.eng.convex.com (news access account)
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. Organization: Convex Computer Corporation, Colorado Springs, CO
  11. Lines: 37
  12. Originator: tchrist@pixel.convex.com
  13. Nntp-Posting-Host: pixel.convex.com
  14. X-Disclaimer: This message was written by a user at CONVEX Computer
  15.               Corp. The opinions expressed are those of the user and
  16.               not necessarily those of CONVEX.
  17.  
  18. From the keyboard of kc@hpscit.sc.hp.com (Kwok Cheung):
  19. :    I am fairly new on perl and have use awk and sed for
  20. :a long time. I have a question in regard to the camel book.
  21. :On p.259 the nfinger program, can any one explain what is the
  22. :meaning of the following line.
  23. :
  24. :exec 'finger', @fingerargs, @finger if @finger;
  25. :
  26. :The last part is the one I have problem in trying to understand
  27. :
  28. : @finger if @finger
  29.  
  30. Consider that the exec line is really
  31.  
  32.     exec('finger', @fingerargs, @finger)     if @finger;
  33.  
  34. Meaning run this command if we found anyone to finger.
  35.  
  36. :when I run it with the full line, it just return with
  37. :
  38. :Couldn't run finger:
  39. :
  40. :Even I specific the full path to finger '/usr/bin/finger"
  41. :But when I delete the last 3 word
  42. :
  43. :exec 'finger', @fingerargs;
  44. :
  45. :The nfinger runs, but I cannot pass on the logon to the program.
  46.  
  47. I would look at what the list @finger contains: I suspect it's empty.
  48.  
  49. --tom
  50. -- 
  51.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  52.  
  53.     #else /* !STDSTDIO */     /* The big, slow, and stupid way */
  54.         --Larry Wall in str.c from the perl source code
  55.