Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!cs.utexas.edu!sun-barr!rutgers!mcnc!uvaarpa!mmdf From: ckclark@athena.mit.edu Newsgroups: comp.lang.perl Subject: Bug with $` in s///; in 4.000,4.003 Message-ID: <1991Apr20.193701.17201@uvaarpa.Virginia.EDU> Date: 20 Apr 91 19:37:01 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: ckclark@athena.mit.edu Organization: The Internet Lines: 22 A problem occurs when trying to replace tabs with spaces using the invocation: while (<>) { 1 while s/\t+/' 'x (length($&) * 8 - length($`) % 8)/e; print; } (taken from the Gospel According to lwall, Chapter 3, pg. 105, footnote 31) When I run it in 3.044, it works fine, but when I try it in 4.000 or 4.003, it acts as if length($`) is 0; i.e., as if $` is not bring set. I have not seen anything in the documentation which indictates that this behavior change is intentional. Am I missing something? -Calvin INTERNET ckclark@mit.edu UUCP ...!mit-eddie!mit-athena!ckclark BITNET Use a ouija board.