Return-Path: Delivered-To: apmail-perl-docs-dev-archive@perl.apache.org Received: (qmail 27651 invoked by uid 500); 21 Feb 2002 12:11:28 -0000 Mailing-List: contact docs-dev-help@perl.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list docs-dev@perl.apache.org Received: (qmail 27638 invoked from network); 21 Feb 2002 12:11:27 -0000 Message-ID: <3C74E3EC.9040304@stason.org> Date: Thu, 21 Feb 2002 20:11:24 +0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: en-us MIME-Version: 1.0 Cc: docs-dev@perl.apache.org Subject: untabify script References: <3C624180.90F12971@inet.uni2.dk> <3C74B68A.2090800@stason.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Stas Bekman wrote: > just remember to untabify your files if you are still using real tab char: > > % cat ~/bin/untabify.pl > #!/usr/bin/perl -pi > s/\t/' ' x (8 - length($`) % 8)/eg; In fact this script is not good, because it doesn't handle correctly adjucent tabs and we want 4 chars indent, so use this one if your editor doesn't do the write thing in first place. This one seems to do the work much better: #!/usr/bin/perl -pi BEGIN {use Text::Tabs; $tabstop = 4;} $_ = expand($_); _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org For additional commands, e-mail: docs-dev-help@perl.apache.org