Write a script for 'count the no.of digits using regular
expressions in perl..
Answer Posted / arun janardhanan
Simple guys here we go :-).........
#!/usr/bin/perl -w
use strict;
my($test,$number) = ("","");
$test = "12344tyyyyy456";
$number = ($test =~ tr/[0-9]/[0-9]/);
print "Number of digits in variable is :- $number ";
exit;
| Is This Answer Correct ? | 11 Yes | 5 No |
Post New Answer View All Answers
Explain gmtime() function in perl?
What is the different between array and hash in perl programming?
Define say() function in perl?
How to create a package?
Explain chomp?
Why aren't Perl's patterns regular expressions?
How many types of variable in perl?
What are some common methods to all handles in perl?
What is -> symbol in perl?
Show the use of sockets for the server and client side of a conversation?
How can you define “my” variables scope in Perl and how it is different from “local” variable scope?
What is perl pop array function?
How to add elements in a hash in perl?
How can arrays be tied?
What are hashes?