how to find a substring in a string without using substr
built in functions, and print the substring found
Answer Posted / yashwanth
$r="YASHWANTH";
@n=split (//,$r);
print "@n\n";
@t=splice(@n,0,3);
print "@t\n";
$r=join("",@t);
print "$r\n";
~
~
Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
What is a chop() function in perl?
Explain lists ?
What are the purpose of close(), getc() and read() functions?
What is the use of '>>' in perl?
What are perl variables?
How to connect to SQL server through Perl?
How to open a directory in perl?
Which of these is a difference between Perl and C++ ?
Explain ivalue in perl?
Why to use perl?
If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?
Write a program to decode the data in the form using cgi programming
What are the different types of perl operators?
what is the function of Return Value?
How do I replace every character in a file with a comma?