Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Clearing user defined variables

by Wassercrats (Initiate)
on Apr 13, 2004 at 07:28 UTC ( [id://344644]=note: print w/replies, xml ) Need Help??


in reply to Re: Clearing user defined variables
in thread Clearing user defined variables

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Re: Clearing user defined variables

Replies are listed 'Best First'.
Re: Re: Re: Clearing user defined variables
by matija (Priest) on Apr 13, 2004 at 07:40 UTC
    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

      RUN: {{ .... }}
      and declare evry variable as my inside the braces, and just redo RUN when needed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://344644]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found