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
Write a program to decode the data in the form using cgi programming
what are the steps involved in reading a cgi script on the server?
How to read a directory in perl?
Explain a tell function in perl?
Explain the arguments for perl interpreter.
Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)
“Perl regular expressions match the longest string possible”. What is the name of this match?
What are stdin, stdout and stderr?
What are prefix dereferencer?
What is a chop() function in perl?
What are the advantages and disadvantages of perl language?
Can you add two arrays together?
How to code in perl to implement the tail function in unix?
what are prefix dereferencer and list them out?
What is 'rollback' command in perl?