baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
Please could someone take look at the code(pseudo code) and tell me why is the for loop skipped??? I am a bit tired but i still should see a reason, however i am not seeing it.
so $lb and $la are printed just before the for loop, but not within.my @a; while(<INA>){ chomp; /^([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t/; if($2 eq $c){ push(@a,[$3,($3 eq '+')?($4):($5)]); } } close INA; foreach (@a){ my $la = $_->[1]+$optTSS; my $lb = $_->[1]-$optTSS; print "$la,$lb\n"; # it prints $la,$lb here for(my $i =$la; $i <=$lb;$i++){ # loop is skipped no printing print "$la,$lb,$i"; }; print ">\n"; }
thnx
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: for loop is skipped for not so obvious reason (false)
by Anonymous Monk on Feb 06, 2013 at 11:41 UTC | |
by Anonymous Monk on Feb 06, 2013 at 11:42 UTC | |
|
Re: for loop is skipped for not so obvious reason
by Anonymous Monk on Feb 06, 2013 at 14:16 UTC |