home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5702 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.7 KB

  1. Path: sparky!uunet!mcsun!uknet!stl!sbil!wet!spitws117!jim
  2. From: jim@spitws117.sbil.co.uk (James Gillespie)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: Bad label: _EVAL_
  5. Message-ID: <1992Sep3.125634.18779@sbil.co.uk>
  6. Date: 3 Sep 92 12:56:34 GMT
  7. References: <1992Sep3.082620.13684@sbil.co.uk>
  8. Sender: news@sbil.co.uk
  9. Reply-To: jim@spitws117.sbil.co.uk
  10. Organization: Salomon Brothers International Limited
  11. Lines: 32
  12.  
  13. In article 13684@sbil.co.uk, I wrote:
  14. >The subject just about says it all.  I have written a perl script which
  15. >appears to run okay until it dies with the following message:
  16. >
  17. >    "Bad label: _EVAL_ at <filename> line 367"
  18. >
  19. >line 367 is:
  20. >
  21. >    open (OUTPUT, "> $oldfile") || die "Couldn't open '$oldfile' for writing\n";
  22. >
  23. >For all the difference it makes, $oldfile is defined and has a sensible value.
  24. >I am using perl version 3.0.1.9, patch level 41.
  25. >
  26. >This error has me completely stumped.  Any help will be greatly appreciated.
  27. >Thanks,
  28. >
  29.  
  30. Oops.  There go another few hundreds or even thousands of dollars.
  31. After a little more experimentation I have discovered the error.  The
  32. script was written to be run by root and $oldfile is a file which is
  33. writable only by root (but readable by everyone).  When I tested the
  34. script as me with a file writable by me, and when I tested it as root
  35. with the original file, it worked fine.  Which leaves me with another
  36. question: why the cryptic bad label error instead of dying with the
  37. given error message?  What did I do wrong?
  38.  
  39. Thanks again,
  40.  
  41. Jim Gillespie ----------------------------------------------------
  42. jim@sbil.co.uk              Salomon Brothers International Limited
  43. +44 71 721 2672             ---------------------------------------------------
  44.            "Three strikes and you're history, kiddo!" - Calvin's mom
  45.