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

  1. Path: sparky!uunet!zephyr.ens.tek.com!wrgate!fangorn.wr.tek.com!rogers
  2. From: rogers@fangorn.wr.tek.com (Roger Southwick)
  3. Newsgroups: comp.lang.perl
  4. Subject: "client" program (Camel book pg 338/339)
  5. Message-ID: <10616@wrgate.wr.tek.com>
  6. Date: 15 Sep 92 17:33:33 GMT
  7. Sender: news@wrgate.wr.tek.com
  8. Organization: Tektronix, Inc.
  9. Lines: 42
  10. X-Newsreader: Tin 1.1 PL5
  11.  
  12. Hi fellow perl hacks....
  13.  
  14. I'm fairly new to comp.lang.perl, and so if this subject has come up before, 
  15. I apologize.... I've only been reading this newsgroup for 2 weeks.
  16.  
  17. I've been playing with the "client" program on pg 338/339 of the Camel
  18. book and I've been unable to make it work.  It bails out with the error:
  19.  
  20.     Invalid argument at ./tst line 38.
  21.  
  22. Here's the snippet of code at that area:
  23.  
  24.     if(bind(S, $this)) {
  25.     print "bind ok\n";
  26.     }
  27.     else {
  28.     die $!;            # <=== line 38.
  29.     }
  30.  
  31. My perl -v shows:
  32.  
  33.     $RCSfile: perl.c,v $$Revision: 4.0.1.7 $$Date: 92/06/08 14:50:39 $
  34.     Patch level: 34
  35.  
  36. I'm running this on a Sun 4, SunOS 4.1.2.
  37.  
  38. I actually would like to know 2 things....
  39.  
  40. 1) What is wrong with line 38 that 'die' can't print errno.
  41.    I tried: die "$!";           # Same results.
  42.         die "hello $!";  # This one prints "hello" before the error message.
  43.  
  44. 2) Why the program gets to this point at all (i.e. why did the bind() fail).
  45.  
  46. Any suggestions, pointers to ftp'able copies of Camel book perl sources
  47. which work on 4.1.[12], $10,000,000 in small unmarked bills, etc. would
  48. be appreciated.
  49.  
  50. Thanks in advance....
  51. --
  52.     -Roger      (Roger.S.Southwick@tek.com)
  53.         UUCP:    ...!uunet!tektronix!Roger.S.Southwick
  54.