What elements of the Perl language could you use to
structure your code to allow for maximum re-use and maximum
readability?
Answer / sagar girase
the element is keyword "sub"
means write the subroutines,
which allow maximum readability
and allow maximum-reuse
if want any other;
write the classes and package..
| Is This Answer Correct ? | 12 Yes | 0 No |
Explain the use of 'my' keyword in perl?
Consider the following example #! /bin/perl use strict; sub sample { my @arr=(1,2,3,4); return @arr; } my ($a,$b,$c,$d) = &sample; print "$a\n$b\n$c\n$d\n"; In the above code, How can I get the $c without using the arguments such as $a,$b. I don't want to use any array to get the return values.
Explain tk?
what is the function that is used to identify how many characters are there in a string?
What does 'do' statement do in perl?
Try pattern matching for the following: 1) 10.111.23.11 2) /root/abc/cde/fgg/ac.xml --> Get file name without extention. 3) /root/abc/ac.xml/fgg/ac.xml --> Get file name without extention. 4) What does "DIE" meant in PERL? 5) chomp 6) "This is saturday" --> Print the weekday number. 7) 11-2-2009 --> Print the name of the month. 8) Reverse the string without using func in C.
Enlist the advantages of using c over perl?
Define dynamic scoping.
What is the use of '>>' in perl?
Can we load binary extension dynamically?
How does polymorphism work in perl?
You want to download the contents of a url with perl. How would you do that?