in reply to counting leading white spaces
$_ = " \ta"; print tr/ \t/ \t/; # prints "5"
Or count and delete:
$_ = " \ta"; print tr/ \t//d, $_; # prints "5a"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: counting leading white spaces
by almut (Canon) on Feb 11, 2009 at 20:29 UTC | |
by hbm (Hermit) on Feb 12, 2009 at 04:05 UTC |