Re: Re: modifing and writing to a file (solved)

2003-07-24 Thread Ged
print "e.g. program.pl \n"; } Hopefully it may be of some use to somebody else starting out and stumbling in this area. > > From: Ged <[EMAIL PROTECTED]> > Date: 2003/07/24 Thu AM 08:47:23 GMT > To: [EMAIL PROTECTED] > Subject: Re: Re: modifing and

Re: Re: modifing and writing to a file

2003-07-24 Thread Ged
AIL PROTECTED] > Subject: Re: modifing and writing to a file > > NYIMI Jose (BMB) wrote: > > >s/a-z/A-Z/g should be s/[a-z]/[A-Z]/g; > > > > Character classes are only possible in the matching part of the regex, > not in the replacement part. You regex says substit

Re: modifing and writing to a file

2003-07-24 Thread Sudarshan Raghavan
NYIMI Jose (BMB) wrote: s/a-z/A-Z/g should be s/[a-z]/[A-Z]/g; Character classes are only possible in the matching part of the regex, not in the replacement part. You regex says substitute all occurences of a lowercase alphabet with the string '[A-Z]' -- To unsubscribe, e-mail: [EMAIL PROTEC

RE: modifing and writing to a file

2003-07-24 Thread NYIMI Jose (BMB)
s/a-z/A-Z/g should be s/[a-z]/[A-Z]/g; You also use uc function like this : print BACKUP uc "$_"; #or #print BACKUP uc ; C:\>perldoc -f uc uc EXPR uc Returns an uppercased version of EXPR. This is the internal function implementing the "\U" escape in double-quoted string

Re: modifing and writing to a file

2003-07-24 Thread Janek Schleicher
Ged wrote at Thu, 24 Jul 2003 08:00:04 +: > I am very new to perl (2 days) but am finding it very rewarding. I have however > stumbled across a problem hopefully somebody can help me with. > > I am trying to open a file, change the text from lowercase to uppercase and rewrite > it to a back

RE: modifing and writing to a file

2003-07-24 Thread Marcos . Rebelo
if you are new to perl try perl -e "print uc($_) while (<>);" c:/ged/perl files/stuff.txt > c:/ged/perl files/stuff.bk -Original Message- From: Ged [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 10:00 AM To: [EMAIL PROTECTED] Subject: modifing and writing to a file Hi all, I a