home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7471 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  795 b 

  1. Path: sparky!uunet!haven.umd.edu!mimsy!folta
  2. From: folta@cs.umd.edu (Wayne Folta)
  3. Newsgroups: comp.lang.perl
  4. Subject: Feature request for perl V
  5. Message-ID: <62887@mimsy.umd.edu>
  6. Date: 17 Dec 92 00:42:36 GMT
  7. Sender: news@mimsy.umd.edu
  8. Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
  9. Lines: 13
  10.  
  11. Could grep have an added option/mode that would allow me to get an array
  12. of indices instead of an array of items? I want to read a file into an
  13. array, then do some greps in the array, some calculations, and then if
  14. everything is right, make a couple of changes in the array, then write it
  15. back out to the file. If I could do this:
  16.  
  17.    @line_numbers = grepi (/IN A/, @lines) ;
  18.  
  19. I'd be pretty happy. How's it sound?
  20. -- 
  21.  
  22.  
  23. Wayne Folta          (folta@cs.umd.edu  128.8.128.8)
  24.