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

Explain the internal working of cgi

516


What is perl dbi?

500


What are prefix dereferencer? List them.

575


What is cpan ? What are the modules coming under this?

520


We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2009






What is subroutine in perl?

536


How can you call a subroutine and identify a subroutine?

510


How can you create anonymous subroutines?

549


How to remove a directory in perl?

494


Explain cpan?

542


Differentiate between c++ and perl.

610


How to sort arrays in perl?

633


Difference between the variables in which chomp function work ?

623


How are parameters passed to subroutines in perl?

514


How to start perl in interactive mode?

570