Write a script for 'count the no.of digits using regular
expressions in perl..
Answer Posted / rajendran
($test,$number) = ("","");
$test = "12344tyyyyy456";
@test=split('',$test);
foreach(@test)
{
if ($_ =~ /\d/)
{$number++;
}
}
print $number;
Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
How to determine strings length in perl?
What is perl programming?
Define say() function in perl?
Explain what is STDIN, STDOUT and STDERR?
what is the function of Return Value?
What is perl dbi?
Explain the meaning of closure in perl.
Which guidelines by Perl modules must be followed?
Explain the difference between "my" and "local" variable scope declarations. ?
What is stdin in perl?
How do I send e-mail from a Perl/CGI program on a Unix system?
What can be done for efficient parameter passing in perl?
How to copy a file in perl?
What is boolean context?
How many types of variable in perl?