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
what is the main function of fork() in cgi programming?
What does the q{ } operator do?
How will you access an element of a perl array?
Explain subroutine?
What syntax is used for grep() function?
What is a perl references?
Explain goto expr?
Why does Perl not have overloaded functions?
Explain use of ‘my’ keyword in perl?
What is the peculiarity of returning values by subroutines in perl?
How do I replace every character in a file with a comma?
what is the function that is used to identify how many characters are there in a string?
What is subroutine in perl?
You want to empty an array. How would you do that?
For a situation in programming, how can you determine that Perl is a suitable?