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