home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 4923 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.1 KB  |  31 lines

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