in reply to User management system: update problem
The file was not updated, which means your use of the replace operator on the filehandle probably doesn't work as you expect.$ echo -e "old\nfarts\nsmell" > foo $ cat foo old farts smell $ perl use strict; use warnings; my $fh = undef; open ($fh, "<", 'foo') or die "Can't open: $!"; while (<$fh>) { chomp; $fh =~ s/old/new/g; } close ($fh) or die "Can't close: $!"; __END__ $ cat foo old farts smell
Also, consider using the readmore tags since your code is extensive. See Perl Monks Approved HTML tags.
|
|---|