in reply to Re: use strict
in thread use strict
When run, this will produce:#!/usr/bin/perl -w print "Hello;
Can't find string terminator '"' anywhere before EOF at ./test.pl line 3.
Ok, this is an easy one to see the error :) I am using it for examples sake! Anyways, now, let's change the script to:
#!/usr/bin/perl -w use diagnostics; print "Hello;
Now, this is what you would see:
Can't find string terminator '"' anywhere before EOF at ./test.pl line 4 (#1)
(F) Perl strings can stretch over multiple lines. This message means that
the closing delimiter was omitted. Because bracketed quotes count nesting
levels, the following is missing its final parenthesis:
print q(The character '(' starts a side comment.);
If you're getting this error from a here-document, you may have
included unseen whitespace before or after your closing tag. A good
programmer's editor will have a way to help you find
these characters.
Uncaught exception from user code:
Can't find string terminator '"' anywhere before EOF at ./test.pl line 4.
Just an aside to hopefully help some folks learn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: use strict
by mikfire (Deacon) on Jun 07, 2000 at 20:02 UTC |