perleager has asked for the wisdom of the Perl Monks concerning the following question:
open (FILE, "$datafile") or die "Can't read: $!"; while (<FILE>) { ($user, $pw) = split "\|"; $field{$user} = $pw; foreach (keys %field) { print <<EOF; $field{$_}<BR> EOF } } @users = split(/,/,$INPUT{'users'}); #i'm using checkboxes #foreach $users (@users) { delete $field{'$users'}; print <<EOF; $users #debug EOF #}#foreach users open (FILE, ">$datafile") or die "Can't write: $!"; foreach (keys %field) { print FILE "$_\|$field{$_}\n"; print <<EOF; $field{$_}<BR> EOF } close(FILE); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File editing problem
by gumby (Scribe) on Jun 16, 2002 at 19:00 UTC | |
by r0b (Pilgrim) on Jun 16, 2002 at 19:05 UTC | |
|
Re: File editing problem
by Aristotle (Chancellor) on Jun 16, 2002 at 20:14 UTC | |
|
Re: File editing problem
by dda (Friar) on Jun 16, 2002 at 19:05 UTC | |
by Aristotle (Chancellor) on Jun 16, 2002 at 19:49 UTC |