FemmeGretha has asked for the wisdom of the Perl Monks concerning the following question:
Thank you in advance!open(TEMP,">$tmpfile") || die "Can't create $tmpfile.\n"; foreach $i (@indata) { chomp($i); ($username,$password) = split(/\|/,$i); if ($username eq $in{'oldname'} && $password eq $in{'oldpw'} && $in{ +'delete'} ne "yes") { print TEMP "$in{'oldname'}|$in{'newpw1'}\n"; print "<p>Your password has been changed.</p>"; print "<p>Thank you!</p>\n"; } elsif ($username eq $in{'oldname'} && $password eq $in{'oldpw'} && +$in{'delete'} eq "yes") { print "<p>Your password has been deleted.</p>\n"; print "<p>Thank you!</p>\n"; } else { print TEMP "$i\n"; } } close(TEMP);
Edit, BazB: added code tags
To clarify:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to verify array fields and print ONE message at the end
by mcogan1966 (Monk) on Oct 28, 2003 at 19:58 UTC | |
|
Re: How to verify array fields and print ONE message at the end
by QM (Parson) on Oct 28, 2003 at 20:10 UTC | |
by FemmeGretha (Initiate) on Oct 29, 2003 at 15:56 UTC |