Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Pearls (not really) of Perl programming

by Nkuvu (Priest)
on Nov 25, 2004 at 14:04 UTC ( #410402=note: print w/ replies, xml ) Need Help??


in reply to Re: Pearls (not really) of Perl programming
in thread Pearls (not really) of Perl programming

This is at the beginning of a script that I must have written shortly after I learned about use strict. I didn't really understand lexical scope, I just wanted the errors to go away. Can we say "missing the point"?
I'm still in the bad habit of doing this. I blame C for the habit.


Comment on Re^2: Pearls (not really) of Perl programming
Download Code
Replies are listed 'Best First'.
Re^3: Pearls (not really) of Perl programming
by Anonymous Monk on Nov 25, 2004 at 18:17 UTC
    It's funny that you mention C - whenever I had to deal with it, I would always create additional blocks inside a func just to limit variable scope.
    int a() { { int a, b; ... } /* move on */ { int a, b, c; } }
    That did result in some excessive indentation though.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2015-07-28 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls