Re: Syntax error
From: Martin L. (mjpliv_at_eastlink.ca)
Date: 03/30/04
- Next message: Martin L.: "Re: Syntax error"
- Previous message: Martin L.: "Re: Syntax error"
- In reply to: ko: "Re: Syntax error"
- Next in thread: Paul Lalli: "Re: Syntax error"
- Reply: Paul Lalli: "Re: Syntax error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Mar 2004 16:24:38 GMT
ko wrote:
>
> Not sure exactly why you got those errors, did a copy/paste and got
> different ones. Did you copy/paste in your post, or type it?
>
> So I didn't go through the whole script, but a cursory inspection
> revealed a couple of problems. Hopefully the corrections will help
> get you started. After corrected it passed syntax checks (-c switch),
> assuming 'use strict' and 'use warnings'. Maybe that's the reason you
> got the different error messages - you should always start your
> scripts with:
>
> use strict;
> use warnings;
>
> [snip code]
>
>
> The way you have the code formatted is very hard to read. Issue a
> 'perldoc perlstyle' from your shell for some guidelines to make your
> scripts easier to read/maintain.
>
> HTH - keith
Thanks for the response!
Nice catch on the capital "I"- I would have looked for that one a long
time before seeing it. (and the other typo).
Book I am learning from does not show the "use strict" or "use
warnings" lines in external .lib files. Normally i would use the "use
strict" in all my scripts. I added both to the problem script,
corrected the typo's and I got an error to the effect that it could not
find the files required for "use warnings". I removed it and everything
runs fine now. Thanks for the input.
Do you have a URL for a site that discusses perl formating norms to
make my script more readable. I have yet to be able to get my resident
copy of perl to spit out anything.
Thanks
Martin L.
- Next message: Martin L.: "Re: Syntax error"
- Previous message: Martin L.: "Re: Syntax error"
- In reply to: ko: "Re: Syntax error"
- Next in thread: Paul Lalli: "Re: Syntax error"
- Reply: Paul Lalli: "Re: Syntax error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|