What is the difference between module and package?
Answer Posted / kiruthikau
- A module is a .pm file containing some Perl code.
- A package is a declaration of the name of the current
scope, e.g.:
package Math::Complex
- Which can occur in the code of a module or a script.
- A module can be used, because it is a physical
'thing', but a package cannot.
- A module may contain several packages:
Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What are perl strings?
For a situation in programming, how can you determine that Perl is a suitable?
Where do we require ‘chomp’ and what does it mean?
How to start perl in interactive mode?
Explain different types of perl operators.
What does -> symbol indicates in Perl?
How does polymorphism work in perl?
What are the various advantages and disadvantages of perl?
Differentiate use and require?
What are scalars?
What does Perl do if you try to exploit the execve(2) race involving setuid scripts?
How to open and read data files with Perl
How to read a directory in perl?
What is the difference between die and exit in perl?
What are the various file operations in perl. Explain with example.