Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^7: Newline's creep in, while using Tie::File

by marto (Cardinal)
on Nov 17, 2020 at 11:42 UTC ( [id://11123733]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Newline's creep in, while using Tie::File
in thread Newline's creep in, while using Tie::File

"It sort of slowed down the initial code development"

How much time did you save by not typing my, and how much time has been spent finding problems caused by a typo in a variable name?

Replies are listed 'Best First'.
Re^8: Newline's creep in, while using Tie::File
by stevieb (Canon) on Nov 17, 2020 at 16:15 UTC
    "How much time did you save by not typing my, and how much time has been spent finding problems caused by a typo in a variable name?"

    ^ That.

    I have typed out use strict; at least several hundred thousand times over my 20 years writing Perl, and if it saved me even just 10 minutes troubleshooting why a variable is being clobbered, or why a variable isn't updated as expected, I feel my efforts were worth it. Also, by forcing you to declare all variables, it makes it far easier at a glance to see where variables are designed to be scoped. Without declaration, it's hard to tell whether a variable is global or not without having to scroll through code. That's even more time saved.

Re^8: Newline's creep in, while using Tie::File
by Bod (Parson) on Nov 17, 2020 at 19:37 UTC
    Of course, it is impossible to know how much time time I would have saved debugging had I used use strict; but I am convinced of the wisdom going forward...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-20 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found