How do you debug a Perl scripting ( at the compile time
error or run
time error) in Unix environment ?
Answer Posted / manohar
#! /usr/bin/perl -d
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
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,
Explain cpan?
What is the use of '>>' in perl?
Explain goto label, goto name, and goto expr?
What can be done for efficient parameter passing in perl? Explain.
Explain splicing of arrays?
What does the’$_’ symbol mean?
How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.
What are the various uses of perl?
What is perl unshift array function?
How will you create a file in perl?
what is CPAN?
What does last statement do in perl?
How do I send e-mail from a Perl/CGI program on a Unix system?
How do you give functions private variables that retain their values between calls?