[wellylug] perl - capitalize all text in file

Grant McLean grant at mclean.net.nz
Wed Mar 30 23:27:49 NZST 2005


On Wed, 2005-03-30 at 21:41 +1200, michael at diaspora.gen.nz wrote:
> Grant McLean writes:
> >Just in case you're still interested in a Perl solution:
> 
> >  perl -ne 'print uc' filename
> >  perl -pe 'tr/a-z/A-Z/' filename
> >  perl -n -i.bak -e 'print uc' filename
> 
> Far too long.
> 
>    perl -pe '$_ = uc' filename

Actually, I did consider that one, but I was restricting myself 
to the subset of Perl which does not use $ signs :-)

Grant




More information about the wellylug mailing list