Re: Change \'[A-Z] to \'[a-z]

2003-07-17 Thread Eric Sisler
On Tue, 2003-07-15 at 21:24, Eric Chevalier wrote: > Oops! I misunderstood the original requirements; my solution won't work > since it will lower-case characters that need to remain uppercase. > > Eric (monumentally embarrassed!) Eh - no big deal. ;-) Had I not known about tr it would have b

Re: Change \'[A-Z] to \'[a-z]

2003-07-16 Thread Mark Neidorff
On Tue, 15 Jul 2003, Eric Chevalier wrote: > At 02:58 PM 7/15/2003 -0600, Eric Sisler wrote: > > >Ok, I'm tired of banging my head against this one. I know there must be > >a simple perl, sed or tr solution, but I can't seem to find it. I'm > >cleaning up some extracted data and the one annoyin

Re: Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Eric Chevalier
At 10:06 PM 7/15/2003 -0500, Eric Chevalier wrote: Maybe I'm missing something obvious, but why not a simple tr command: tr [A-Z] [a-z] outfile It seems to work just fine for me; caps are replaced by their lower-case equivalent, and everything else is left untouched. Oops! I misunderstood t

Re: Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Eric Sisler
On Tue, 2003-07-15 at 21:06, Eric Chevalier wrote: > >Ok, I'm tired of banging my head against this one. I know there must be > >a simple perl, sed or tr solution, but I can't seem to find it. I'm > >cleaning up some extracted data and the one annoying thing I have left > >is a single quote foll

Re: Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Eric Chevalier
At 02:58 PM 7/15/2003 -0600, Eric Sisler wrote: Ok, I'm tired of banging my head against this one. I know there must be a simple perl, sed or tr solution, but I can't seem to find it. I'm cleaning up some extracted data and the one annoying thing I have left is a single quote followed by a capit

Re: Change \'[A-Z] to \'[a-z] - Thanks!

2003-07-15 Thread Eric Sisler
I mumbled, > Ok, I'm tired of banging my head against this one. I know there must be > a simple perl, sed or tr solution, but I can't seem to find it. I'm > cleaning up some extracted data and the one annoying thing I have left > is a single quote followed by a capital letter, which I want to ch

Re: Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Matthew Melvin
On 15 Jul 2003 at 2:58pm (-0600), Eric Sisler wrote: > Ok, I'm tired of banging my head against this one. I know there must be > a simple perl, sed or tr solution, but I can't seem to find it. I'm > cleaning up some extracted data and the one annoying thing I have left > is a single quote follow

Re: Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Tomas Johansson
On Wed, 2003-07-16 at 00:26, Tomas Johansson wrote: > Yes, or if you have an array of strings, and want to replace all capital > letters in all strings, maybe this could be a solution: > > sub toLower > { > my @parms = @_; > for (@parms) { tr/A-Z/a-Z/ } > return wantarray ? @parms : $parms[

Re: Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Tomas Johansson
On Wed, 2003-07-16 at 00:19, Geoff Thurman wrote: > In perl, how about > > $_ = "Can'T eat shan'T eat Jane'S cooking."; > s/'T /'t /g; > s/'S /'s /g; > print $_; > > Assuming it's only T and S. Yes, or if you have an array of strings, and want to replace all capital letters in all strings, maybe

Re: Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Geoff Thurman
Eric Sisler wrote: Ok, I'm tired of banging my head against this one. I know there must be a simple perl, sed or tr solution, but I can't seem to find it. I'm cleaning up some extracted data and the one annoying thing I have left is a single quote followed by a capital letter, which I want to ch

Change \'[A-Z] to \'[a-z]

2003-07-15 Thread Eric Sisler
Ok, I'm tired of banging my head against this one. I know there must be a simple perl, sed or tr solution, but I can't seem to find it. I'm cleaning up some extracted data and the one annoying thing I have left is a single quote followed by a capital letter, which I want to change to lowercase li