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 the various file operations in perl. Explain with example.
Which guidelines by Perl modules must be followed?
What are the advantages of perl programming?
How will you open a file in a write-only mode in perl?
What is the use of -t?
Explain which feature of PERL provides code reusability?
Explain '->' in perl?
What is the use of '>>' in perl?
Explain goto label, goto name, and goto expr?
What is perl dbi?
Explain gmtime() function in perl?
Explain what is the scalar data and scalar variables in Perl?
Explain 'grep' function.
Why to use perl scripting?
Why is it hard to call this function: sub y { "because" } ?