Hi,
habe es jetzt so gelöst :
if ($query->param('action') eq 'admin') {
my $posting = $query->param('posting');
my $postingid = $query->param('postingid');
my @passwords = $query->param('adminlogin');
my $indicator = 0;
foreach (@passwords) {
if ($_ eq $ippasswd) {
htmlbegin();
getipadresses();
htmlend();
$indicator = 1;
last;
}
if ($_ eq $deletepasswd) {
deleteposting($postingid,$posting);
$indicator = 1;
last;
}
}
if ($indicator == 0) {
htmlbegin();
loginerror($posting);
htmlend();
}
}
Kann man das noch etwas schöner machen ?
Ich beziehe moch auf $indicator. Wenn kein Passwort gefunden wird, sollen die letzten 3 Subroutinen ausgegeben werde. So wie es jetzt ist, funktioniert es, es gefällt mir aber nicht ganz, weil ich eine extra Variable dafür anpatze.
Kann man das irgendwie noch effizienter lösen ?
$xNeTworKx.