First of all if you have:
$RealUserName = "true";
$element++;
chop $element;
if($element =~ $PasswordStructure){
print "$element<BR>";
print "Password is correct<BR>";
}else{print "password is wrong<BR>";}
}
will the $element++ work nested in an if statement that is in a foreach loop?
-- - - - - - - - - - - - - - - - - - - - -
Next question:
while going through a foreach loop, how would you break out of it if a condition is true, but then move to the next element to see if the next element produces a match also?
A student who WILL master PERL!
Code:
if ($element =~ $StructureInFile){ $RealUserName = "true";
$element++;
chop $element;
if($element =~ $PasswordStructure){
print "$element<BR>";
print "Password is correct<BR>";
}else{print "password is wrong<BR>";}
}
will the $element++ work nested in an if statement that is in a foreach loop?
-- - - - - - - - - - - - - - - - - - - - -
Next question:
while going through a foreach loop, how would you break out of it if a condition is true, but then move to the next element to see if the next element produces a match also?
A student who WILL master PERL!