Tabs-to-space function
sub tabs2space($) { my $str = shift; 1 while $str =~ s/\t+/' ' x (length($&)*8 - length($`)%8)/e; return $str; }
DZone Snippets > text formatting
11305 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
sub tabs2space($) { my $str = shift; 1 while $str =~ s/\t+/' ' x (length($&)*8 - length($`)%8)/e; return $str; }
#!/usr/bin/perl -wni # para.pl use strict; /^\s+/ || /^$/ ? print : write; format ARGVOUT = ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $_ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~ $_ .