in reply to count digit in a numeric value
$str=123; $fu = length($str); print $fu,"\n";
I know, it's not what you asked, just trying to complicate things needlessly:)perl -e '$str="fff123"; $fu = ($str =~ tr/[a-z]//c); print $fu,"\n";'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: count digit in a numeric value
by wusphere (Novice) on Aug 15, 2004 at 04:16 UTC | |
|
Re^2: count digit in a numeric value
by hsinclai (Deacon) on Aug 16, 2004 at 03:11 UTC |