Akoya has asked for the wisdom of the Perl Monks concerning the following question:
I encountered something interesting today that has me puzzled. I received this warning message:
Bareword found where operator expected at dcwatcherd line 465, near "$LOG _timestamp" (Missing operator before _timestamp?)
referring to this line of code:
print $LOG _timestamp(), q{ }, join ':', $0, $msg_level, $msg;
The first thing I tried worked--I modified the line of code as follows:
print $LOG q{}, _timestamp(), q{ }, join ':', $0, $msg_level, $msg;
My question is: "Why would Perl warn 'Bareword found where operator expected' when it encountered the function call immediately following the indirect filehandle?"
A few things to note:Comments/questions appreciated --Akoya
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bareword warning question
by runrig (Abbot) on Jul 12, 2007 at 22:46 UTC | |
by Akoya (Scribe) on Jul 12, 2007 at 22:59 UTC | |
|
Re: Bareword warning question
by bloonix (Monk) on Jul 13, 2007 at 01:18 UTC | |
|
Re: Bareword warning question
by ysth (Canon) on Jul 13, 2007 at 01:20 UTC | |
|
Re: Bareword warning question
by ikegami (Patriarch) on Jul 12, 2007 at 22:38 UTC | |
by Akoya (Scribe) on Jul 12, 2007 at 22:57 UTC | |
|
Re: Bareword warning question
by Anonymous Monk on Jul 13, 2007 at 06:01 UTC |