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

how to find a substring in a string without using substr
built in functions, and print the substring found

Answer Posted / garg

#! /user/bin/perl
$str="Yashwanth";
$n="wan";
if ($str=~ $n)
{
print $n;
}

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

964


What does localtime() do in perl?

987


How to print escaping characters inside a string in perl?

886


Explain arrays in perl.

924


List the files in current directory sorted by size ?

964


How can the user execute a long command repeatedly without typing it again and again?

918


How can you call a subroutine and identify a subroutine?

973


Is perl a case sensitive language?

1088


what is perl language?

919


What is the difference between single (') and double (") quote in a string in perl?

975


Explain about typeglobs?

916


Explain ivalue?

981


Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?

963


Why to use perl scripting?

979


What is the use of -n and -p options?

1026