home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!eliot!andyc
- From: andyc@eliot.uucp (Andy Panda Collins)
- Subject: Re: Capitalizing words?
- Message-ID: <1992Jul23.180919.4397@eliot.uucp>
- Sender: andyc@eliot (Andy Panda Collins)
- Organization: Systems Center, Inc., Reston, VA, USA
- References: <1992Jul22.175327.15371@news.Hawaii.Edu>
- Distribution: na
- Date: Thu, 23 Jul 1992 18:09:19 GMT
- Lines: 18
-
- Capitalizing a list of words :
- Do you have any books on perl?
- If not your trouble is understandable, otherwise
- just get the book and look up the spiffy command tr
- This little command is very similar, in fact, functionally
- the same as the tr unix utility.
- suppose you want to caps a single variable,
- $spiff for instance
- just do the following
- $spiff=~tr/a-z/A-Z/;
- The best book on perl is probably the O'Reilly nutshell book
- A list of perl scalar operators is listed on page 10 of this book.
- If you don't have a book on perl, get one, and until then better
- hope you have a good set of man pages.
-
- To finish up make a function that take a list and returns the
- capitalized list. If you don't know functions, then you should
- find out.
-