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 / 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


Please Help Members By Posting Answers For Below Questions

Explain lexical variables.

893


how to get back up from private character editor which is saved in the format of .udf

2241


What is the syntax used in Perl grep function?

964


What $! In perl?

907


How to know whether a key exists or not in perl?

915


How can I implement the function overloading in Perl ? I read about the operator overloading, I do not know how to implement the function overloading. Thanks in advance ?

2855


What does the’$_’ symbol mean?

947


What is use of β€˜->’ symbol?

946


What is the difference between die and exit in perl?

934


Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?

1033


Explain USE and REQUIREMENT statements?

879


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

871


Explain goto label, goto name, and goto expr?

879


what are the two ways to get private values inside a subroutine or block?

875


What does this symbol mean '->'?

916