Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by Anonymous Monk
on Nov 17, 2020 at 15:16 UTC ( [id://11123739]=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

I have experimented with turning on use strict; and got frustrated at having to declare variables before use so ended up not bothering. It sort of slowed down the initial code development although, granted, it may well have speeded things up down the line had I persevered.

I used to feel the same way. It's true that not having to think about variable scope or initialization seems easier and faster at first, but those gains have costs like difficulty of debugging and the constant danger of undetected typos. Strict will help you think more about why your variables exist and what constitutes sane defaults. You will find yourself creating less variables and knowing more about how your program works. The default values of your variables then become very useful in determining the flow of your code. Trust the monks, strict is your friend!

Replies are listed 'Best First'.
Re^8: Newline's creep in, while using Tie::File
by Bod (Parson) on Nov 17, 2020 at 19:35 UTC

    Trust the monks, strict is your friend!

    I'm convinced; I'm convinced...

    :D

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found