in reply to Re: Re: Missing the if statement and going directly to else
in thread Missing the if statement and going directly to else
Also, you use lexical 'my' variables in one place and package '$main::' package variables in another for no good reason. 'use strict' is a good habit to get into when you're just learning, and if you want globals, put them in a 'use vars' at the top of the script. It'll catch typos in variable names and can save lots of debugging time, and save you from typing 'main::' on all the variables (since 'use vars' declares them in the current package, you don't have to specify the package). If you think this script is too short to bother with 'use strict', then there's no point in the 'my' and 'main::' either.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Missing the if statement and going directly to else
by Bismark (Scribe) on Jan 17, 2003 at 02:09 UTC | |
by runrig (Abbot) on Jan 17, 2003 at 17:39 UTC |