DaWolf has asked for the wisdom of the Perl Monks concerning the following question:
and in the DevelopUtils.pm file there is the corresponding sub, wich is:$status_chg = DevelopUtils::check_status(@status_atividades);
The problem is that I always get only the first option of the if part as if it is the only option available.sub check_status { @status_atividades = @_; $status_possivel=""; $l = 0; foreach $status(@status_atividades) { if ($l < 1) { if ($status eq "1" or $status eq "9") { $status_possivel .= "<option value=\"2\">Cancelada</op +tion>\n"; $status_possivel .= "<option value=\"3\">Agendada</opt +ion>\n"; $l++; } elsif ($status eq "3" or $status eq "9") { $status_possivel .= "<option value=\"4\">Em Análise Fu +ncional</option>\n"; $l++; } } return($status_possivel); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Can't get the right array value
by Masem (Monsignor) on Nov 07, 2001 at 01:54 UTC | |
Re: Can't get the right array value
by runrig (Abbot) on Nov 07, 2001 at 01:50 UTC | |
Re: Can't get the right array value
by danboo (Beadle) on Nov 07, 2001 at 01:59 UTC | |
Re: Can't get the right array value
by XPWhore (Novice) on Nov 07, 2001 at 02:17 UTC | |
by DaWolf (Curate) on Nov 07, 2001 at 18:38 UTC | |
by XPWhore (Novice) on Nov 07, 2001 at 21:46 UTC | |
by DaWolf (Curate) on Nov 08, 2001 at 01:12 UTC | |
Re: Can't get the right array value
by danboo (Beadle) on Nov 07, 2001 at 02:08 UTC | |
by DaWolf (Curate) on Nov 07, 2001 at 18:41 UTC | |
Re: Can't get the right array value
by Biker (Priest) on Nov 07, 2001 at 02:10 UTC |