I don't like the limitations of scoping my variables. Aren't there pleantly of lower level language that don't even offer that feature? That never bothered me. It seems like it would just slow me down. It's too late for that now anyway.
Re: Re: Clearing user defined variables
Replies are listed 'Best First'.
Aren't there pleantly of lower level language that don't even offer that feature? Well, there's assembler, and ... uf - that's pretty much it, unless you count stack oriented languages like forth and postscript where the concept doesn't even exist.
And we program in Perl, because it is better than those low-level languages. One of the ways it is better is scoped variables.
If you think non-scoped variables don't bother you, try this experiment: rewrite your 3200 line script to use scoped variables (if you're such a hot coder the non-scoped variables never bothered you, this should be peanuts to you). Then maintain both versions for a month, adding the same features to each version. I'm betting you will find maintaining the scoped version much easier.
Actually, assembly is not the only "language" without locals,
basic had no locals for ages and programmers didn't miss them
(it's actually easier to have local variables in most machine-code
then in basic).
However, in Perl, you should use my variables.
You just put the whole script in