Answer Posted / sam
Hash is a specific datatype in PERL and it contains KEYS
and VALUES. Values are referred with the help of keys.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is v-strings?
In Perl we can show the warnings using some options in order to reduce or avoid the errors. What are that options?
What are the logical operators used for small scale operations? Explain them briefly.
Explain the meaning of subroutine?
Explain about typeglobs?
Why to use perl scripting?
How do you give functions private variables that retain their values between calls?
Which functions in perl allows you to include a module file. State their differences.
package MYCALC; use Exporter; our @EXPORT = (); our @ISA = qw(Exporter); our @EXPORT_OK = qw(addition multi); our %EXPORT_TAGS = (DEFAULT => [qw(&addition)],Both => [qw(&addition & +multi)]); sub addition { return $_[0] + $_[1]; } sub multi { return $_[0] * $_[1]; } 1; Program: use strict; use warnings; my @list = qw (2 2); use Module qw(:DEFAULT); print addition(@list),"\n"; Above coding is my module MYCALC and the program which using this module, I have not exported any function using @EXPORT, but I have used the DEFAULT in %EXPORT_TAGS with the function addition, when I call this function from the main it says the error as,
What is warn function in perl?
How will you create a file in perl?
How does polymorphism work in perl? Give an example.
What is posix in perl?
Explain what is perl language?
What are the advantages of perl programming?