Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain gmtime() function in perl?

1021


What is the different between array and hash in perl programming?

989


Define say() function in perl?

1015


How to create a package?

1002


Explain chomp?

966


Why aren't Perl's patterns regular expressions?

1247


How many types of variable in perl?

1129


What are some common methods to all handles in perl?

976


What is -> symbol in perl?

1054


Show the use of sockets for the server and client side of a conversation?

933


How can you define “my” variables scope in Perl and how it is different from “local” variable scope?

1190


What is perl pop array function?

999


How to add elements in a hash in perl?

967


How can arrays be tied?

961


What are hashes?

994