Write a script for 'count the no.of digits using regular
expressions in perl..
Answer Posted / anandan
#!/usr/bin/perl -w
use strict;
my($test,$number) = ("","");
@test = "12344tyyyyy456";
foreach(@test)
{
if ($_ =~ /\d/)
{$number++;
}
}
print $number;
Is This Answer Correct ? | 5 Yes | 15 No |
Post New Answer View All Answers
Explain regular expression in perl?
How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.
What are the two ways to get private values inside a subroutine?
Explain the use of 'my' keyword in perl?
In CPAN module, name an instance you use.
What is the difference between perl list and perl array?
What is perl unshift array function?
What is perl pop array function?
What are scalars?
Explain about typeglobs?
What rules must be followed by modules in perl.
How to replace perl array elements?
How many ways can we express string in Perl?
Explain lexical variables.
How to determine strings length in perl?