integrator has asked for the wisdom of the Perl Monks concerning the following question:
in the debugger, at the breakpoint, I useforeach $line (<$filelog>){ chomp($line); @$ort_log[$site_index]=substr ($line, 2, 1); $DB::single=1; if ((scalar @$ort_log[$site_index])==scalar '+'){ @$filelog[$site_index]=substr ($line, 4, -1); $site_index=$site_index+1; }else{ @$filelog[$site_index]=(substr ($line, 4, -1))+4; $site_index=$site_index+1 } }
to check if it is + or -. The debugger says that it is -. So why does it execute thex @$ort_log[$site_index]
instead of the else block? thanks@$filelog[$site_index]=substr ($line, 4, -1); $site_index=$site_index+1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: if condition
by jwkrahn (Abbot) on Jun 25, 2008 at 02:56 UTC | |
|
Re: if condition
by kyle (Abbot) on Jun 25, 2008 at 03:00 UTC |