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 sort arrays in perl?

1031


Explain the execution of a program in perl.

999


What are the steps involved when the cgi program starts running?

922


Write an example explaining the use of symbol tables.

963


Which has highest precedence in between list and terms? Explain?

871


Explain substr function in perl?

1037


How do I sort a hash by the hash key?

922


What is the purpose of goto expr statement?

916


“Perl regular expressions match the longest string possible”. What is the name of this match?

943


How do I send e-mail from a Perl/CGI program on a Unix system?

1013


What does Perl do if you try to exploit the execve(2) race involving setuid scripts?

949


Explain strftime() function in perl?

951


Write a script to reverse a string without using perl's built in functions?

995


What is the use of "stderr()"?

1020


How to code in perl to implement the tail function in unix?

943