home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5514 < prev    next >
Encoding:
Text File  |  1992-08-26  |  986 b   |  30 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!budnick
  3. From: budnick@cbnewse.cb.att.com (Mary Jo Budnick)
  4. Subject: easy question?: substrings
  5. Organization: AT&T
  6. Distribution: usa
  7. Date: Wed, 26 Aug 1992 21:35:16 GMT
  8. Message-ID: <1992Aug26.213516.22813@cbnewse.cb.att.com>
  9. Lines: 19
  10.  
  11. Hi!  I just started to use Perl and can't find the info in the
  12. Wall/Schwartz book very easily to solve my problem.  Help me out?
  13.  
  14. All I want to do is to change a string in the format of either
  15.     0xffffff00 or ffffff00 into the format
  16.     of 255.255.255.0 
  17.  
  18. The part I'm having trouble w/ is splitting the ffffff00 string
  19. into an array of: ff ff ff 00.  After I do that I plan to
  20. change these array elements into decimal from hex and join
  21. with a ".".  But,  I can't find a good way to successively cut
  22. 2 chars from the ffffff00 string.
  23.  
  24. Thanks!
  25.  
  26. Please send mail to budnick@ihspa.att.com
  27.  
  28. Mary Jo Budnick
  29.  
  30.