Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Amateur Perl Hacker

by Arbogast (Monk)
on Jun 24, 2003 at 15:26 UTC ( [id://268554]=note: print w/replies, xml ) Need Help??


in reply to Re: using $ARGV without arguments
in thread using $ARGV without arguments

Question on acceptable practice.

Subject, warning on Use of uninitialized value in string eq at ...

When this happens, I go back and check my code to make sure it is OK the value is sometimes unitialized. If it OK, I move on and dont worry about it.

Is this a bad habit???

Replies are listed 'Best First'.
Re: Amateur Perl Hacker
by hsmyers (Canon) on Jun 25, 2003 at 14:15 UTC
    Yes. Lots of Famous Really Good Programmers (tm) will tell you to always initialize vars---but since I'm not one of them, I'll tell you to at least try and make it a habit since it will save you grief later on. My rule is that if there is a chance that I'll check the value before I stuff something in it, I'll usually set it to a known value...

    --hsm

    "Never try to teach a pig to sing...it wastes your time and it annoys the pig."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-24 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found