Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!gatech!bloom-beacon!eru!hagbard!sunic!ugle.unit.no!nuug!ulrik!ulrik!aas From: aas@aase.nr.no (Gisle Aas) Newsgroups: comp.lang.perl Subject: It does not work any more Message-ID: Date: 15 Apr 91 13:44:49 GMT Sender: news@ulrik.uio.no (USENET News System) Reply-To: Gisle.Aas@nr.no Distribution: comp Organization: Norwegian Computing Centre, Oslo, Norway Lines: 11 Nntp-Posting-Host: 129.240.192.32 The following expression used to expand tabs to spaces: perl -pe 'while (s/\t/" " x (8 - length($`) % 8)/e) {}' With perl 4.0 at patchlevel 3 it expands every tab to 8 spaces. It looks like length($`) always returns 0. No trouble with 3.0 at patchlevel 44. -- Gisle Aas | snail: Boks 114 Blindern, N-0314 Oslo, Norway Norsk Regnesentral | X.400: G=Gisle;S=Aas;O=nr;P=uninett;C=no voice: +47-2-453561 | inet: Gisle.Aas@nr.no