home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / perl / 5964 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.1 KB  |  32 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!unipalm!ian
  3. From: ian@unipalm.co.uk (Ian Phillipps)
  4. Subject: Length of $' seems broken.
  5. Message-ID: <1992Sep15.234725.23365@unipalm.co.uk>
  6. Organization: Unipalm Ltd., 216 Cambridge Science Park, Cambridge CB4 4WA, UK
  7. Date: Tue, 15 Sep 1992 23:47:25 GMT
  8. Lines: 22
  9.  
  10. $_='hello, Larry'; /a/; print length $';
  11.  
  12. Gives the answer 446468 on a Sunos 4.1.1 with Perl 4.019.
  13. An overestimate? :-)
  14.  
  15. I first encountered problems when an ms-dos Perl 4.019 entered Nirvana
  16. as a result of a sequence like
  17.     $e =~ /blah/;
  18.     $e = $& . $';
  19.  
  20. (yeah, I could probably do it with an s/.../ command, except I need
  21. multiline matching, and writing (.|\n)* is against my religion)
  22.  
  23. I still haven't put my finger on exactly what causes the crash, but
  24. since the last one blew away my MSDOS.SYS file, and all of them need the
  25. BRS, I'm a little reticent at fiddling..
  26.  
  27. Ian
  28. -- 
  29. Ian Phillipps, Unipalm Ltd, 216 Science Park,        Phone +44 223 420002
  30. Milton Road, Cambridge, CB4 4WA, England.        Phax  +44 223 426868
  31.     print unpack( u,q,9:G5S="!A;F]T:&5R('!E<FP@:&%C:V5R"@``,.'');
  32.