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 are the options that can be used to avoid logic errors in perl?
Explain the use of 'my' keyword in perl?
Does Perl have reference type?
How to read file into hash array ?
Can we load binary extension dynamically?
Difference between the variables in which chomp function work ?
How do I read command-line arguments with Perl?
Explain substr function in perl?
What is the use of "stderr()"?
Explain grooving and shortening of arrays?
How do I replace every character in a file with a comma?
What does delete function do in perl?
Why does Perl not have overloaded functions?
How to open and read data files with Perl
How can you use Perl warnings and what is the importance to use them?