Write a script for 'count the no.of digits using regular
expressions in perl..
Answer Posted / santha
$testnumber='34535sssss24';
$numbercount=0;
while($testnumber=~m{\d}igs)
{
$numbercount++;
}
print "\n $numbercount";
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How do find the length of an array?
Explain lists ?
Write a program to show the process of spawning a child process
How does a “grep” function perform?
How to dereference a reference?
How are parameters passed to subroutines in perl?
What is the difference between use and require in perl programming?
You want to concatenate strings with perl. How would you do that?
What are scalar data and scalar variables?
How do I replace every character in a file with a comma?
In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?
How and what are closures implemented in perl?
What is use of ‘->’ symbol?
Why aren't Perl's patterns regular expressions?
Where do we require ‘chomp’ and what does it mean?