in reply to Guessing tab size
#!/usr/bin/perl -wn if (not /^=/ .. /^=cut/) { die $tab = "4\n" if /^ \S/; } END { print "8\n" unless $tab; }
This is far from fool-proof however. In fact I'd go as far as to say that no method is fool-proof since a file may have been edited by people with different tab/space styles.
--
John.
|
|---|