From: Jay <[EMAIL PROTECTED]>
> Turn on use strict for starters, and use warnings. you won't want to
> run with them, if you have things that you know will cause errors, but
> they'll give you some other input. Keep a special eye out for "Bare
> word found where $x expected" errors. The thing to remember is that
> perl has no way of knowing what's really missing. It just knows what
> its expects to find based on what it's already seen. You can change
> what it expects with coding errors. My best guess si that you're
> actually missing a semicolon somewhere. Consider the following:
>
> if (x) {
> eval {
> print "\n" ;
> }
> }
>
> under some combinations of warning, diagnotics, etc., Perl will carp
> about a missing right brace because it never finds the end of the if
> block before EOF. The reason it never finds the end of the if block
> is that eval needs a semicolon, but the compiler doesn't know why it
> doesn't find the end of the block, it just knows that it doesn't find
> the end of that block before EOF.
You sure? Could you show us a complete example ? And tell us which
perl did you get this behaviour from?
Tried all combinations of
use strict;
use warnings;
use diagnostics;
and never received a word about a missing curly.
Semicolon is optional before the closing curly brace and it doesn't
matter what the last command in the block is.
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>