in reply to Re: Help with a loop
in thread Help with a loop

Monks, Thanks so much! I didn't write this code originally, but edited it to fit what I needed, but I'm an amateur. Thanks for all the suggestions (most of which are above my head). Preceptor solved it for me with this: "that 'eq' line means that the two variables have to match precisely - no whitespace or linefeeds. " I changed it to:
if (($quick_jobtype && ($quick_jobtype =~ /$temp_jobvar/)) || (!$quick +_jobtype)) {
and IT WORKS! Once again the Monks have saved me. Thanks.

Replies are listed 'Best First'.
Re^3: Help with a loop
by Preceptor (Deacon) on Jun 15, 2013 at 12:47 UTC

    As you're maintaining the code, a rewrite is probably a good idea - there really is nothing like code that's not quite correct to give you all manner of headaches down the line (despite working now)