$_ = " \ta"; print tr/ \t/ \t/; # prints "5"
Or count and delete:
$_ = " \ta"; print tr/ \t//d, $_; # prints "5a"
In reply to Re: counting leading white spaces
by hbm
in thread counting leading white spaces
by Spooky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |