Prince99 has asked for the wisdom of the Perl Monks concerning the following question:
This was not exactly what I was looking for. It did not seem to lowercase all the letters(especially uppercase letters after an (_ underscore). It also lowercases my filehandles which I don't want. Naming conventions require all filehandles to be at least 4 characters long. I just got a copy of the perl cookbook this morning, and have not had much time to look through it yet. I will, but I thought my fellow monks might have an idea. Any suggestion would be appreciated.$DATA = "my_data_file""; open(FILE, $DATA) || die "Couldn't open: $!"; while(<FILE>){$line = $line.$_;} close(FILE); $line =~ s/(\w+)/\l\l$1/g; open(FILE, ">$DATA") || die "Couldn't open: $!"; print FILE $line; close(FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: upper/lowercase search/replace
by suaveant (Parson) on Apr 16, 2001 at 17:38 UTC | |
|
Re: upper/lowercase search/replace
by Beatnik (Parson) on Apr 16, 2001 at 17:52 UTC | |
|
Re: upper/lowercase search/replace
by traveler (Parson) on Apr 16, 2001 at 18:22 UTC | |
|
Re: upper/lowercase search/replace
by Rhandom (Curate) on Apr 16, 2001 at 19:47 UTC | |
by Prince99 (Scribe) on Apr 16, 2001 at 20:16 UTC | |
by suaveant (Parson) on Apr 16, 2001 at 21:47 UTC |