Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Welcome to the Monastery
 
PerlMonks  

Re: Am I smoking Crack?

by Adam (Vicar)
on Feb 15, 2001 at 01:12 UTC ( [id://58550]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Why do I get a 'found = in conditional, should be ==' error ? (was: Am I smoking Crack?)

Yes.

That is a great example of poor programing style. Remember, "White space is cheap" and then try something like:

if( $2 eq "No" and $3 eq "F" ) { $failed = 1; $failed_job = $1; last LOOP; }

Replies are listed 'Best First'.
Re: Re: Am I smoking Crack?
by thor (Priest) on Feb 15, 2001 at 16:24 UTC
    I'll be the first to admit that I have "poor style" as it were. I code the way I think. In my mind, I see "I want $failed to equal 1, $failed_job = $1, and exit the LOOP if $2 is No and $3 is F", so that's exactly what I wrote. My philosophy is "whatever works". Also, I think that both yours and mine are equally ok. It just depends on what you are looking for. In my case, I wanted it to be easy for someone reading the code to find conditions which $failed was 1. In your example, it would be easier to see what happens when $2 eq "No" and $3 eq "F". Thanks to all who replied, thor

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://58550]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.