473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Getting error while using Perl Module

Expand|Select|Wrap|Line Numbers
  1. package ExampleModule;
  2.  
  3. use strict;
  4. use base "Exporter";
  5. our @EXPORT = qw(hello_world);
  6.  
  7. sub hello_world {
  8.     print "Hello,world";
  9. }
  10. 1;
  11.  
  12. #!/usr/bin/perl -w
  13. use strict;
  14. use lib '/home/Admin/Desktop/Perl_Work_Space/ExampleModule.pm/';
  15. use ExampleModule qw(hello_world);
  16. hell_world('ram');
  17. exit;
  18.  
error:
Undefined subroutine &main::hell_world called at module.pl line 5.
Feb 5 '14 #1

✓ answered by RonB

You have a typo.

Expand|Select|Wrap|Line Numbers
  1. hell_world('ram');
should be
Expand|Select|Wrap|Line Numbers
  1. hello_world('ram');

2 958
RonB
589 Expert Mod 512MB
You have a typo.

Expand|Select|Wrap|Line Numbers
  1. hell_world('ram');
should be
Expand|Select|Wrap|Line Numbers
  1. hello_world('ram');
Feb 5 '14 #2
ya thank you for your replay . Before you answering this question i got it what's the wrong in my code.
Feb 7 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Earl Eiland | last post by:
When executing the following code snippet import process .... .... for x in Files: Command_String = 'C:\Program Files\WinRK\WinRK.exe -create ' + os.path.join(InputDirectory,...
1
by: smsabu2002 | last post by:
Hi, I am facing the build problem while installing the DBD-MySql perl module (ver 2.9008) using both GCC and CC compilers in HP-UX machine. For the Build using GCC, the compiler error is...
0
by: Envex Developments | last post by:
Hey guys, I have a need to install the DBD::Pg Perl module on many shared web servers, which do not have PostgreSQL installed. Then the DBD::Pg module will just connect to a remote PostgreSQL...
2
by: =?Utf-8?B?R3lhbmVuZHJh?= | last post by:
I am using Ajax control(Update Panel) in my web page(ASP.Net 2.0) and putting Report Viewer(Sql Server Reporting Services 2005) Control in it. When I am displaying any report it is coming...
0
by: srinu123 | last post by:
Hi all, I am tring the install perl module(GD-2.35) on my linux machine.But i am getting some error...Please find the error below... D.xs:1450: invalid lvalue in assignment GD.xs:1450:...
3
by: Max58kl | last post by:
Trying to access data and print it to the screen using Perl Builders I/O Window -------------------------------------------------------------------------------- Hi I am using a program called...
8
by: gajendra98 | last post by:
Hi All I Have installed Active perl in my system and I am new to perl and automation...Could some one tell me how to install the perl modules and how to use those modules with the perl for...
2
by: somsub | last post by:
Hi all, Here is my samle code use strict ; use warnings ; use IO::Uncompress::Unzip ; When I compiled this three lines of code in win32 I got error like below.
2
by: sbettadpur | last post by:
hello, I am trying to install the Text::NLP::Stanford::EntityExtract perl module on windows xp. But its not installing properly... can anybody tell solution for the above problem. But its...
0
by: santhanalakshmi | last post by:
Hi, Please help me out. I have successfully binded to my ADSI server(windows 2003 machine) from my windows XP machine? #LDAP SEARCHING my $ldapSearch = $ldap->search(base...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.