473,387 Members | 1,431 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,387 software developers and data experts.

How to import and define subroutines

Hello,

Could someone please help me define and imported a subroutine. I will try to make this simple.

Script-A contains all of the processes for script-B. Script-A uses script-B as a 'use base'.
Script-A (containing the processes) has subroutine-1 which is used by subroutine-2

How do I import/define script-A subroutine-2 to script-B.

On Script-A subroutine-2
This
Expand|Select|Wrap|Line Numbers
  1. sub hellos1{
  2. my $self = shift;
  3. &say_hello_to('Dan');
  4. $hello1 = $hellos{'Dan'}
  5. print $hello1;
  6. }
OR this
Expand|Select|Wrap|Line Numbers
  1. sub hellos1{
  2. my $self = shift;
  3. &say_hello_to('Dan');
  4. $hello1 = $hellos{'Dan'}
  5. print $hello1;
  6. }
How do I import/define subroutine-2 ($hello1) to script-B.
If you need to see more, I am willing show you both scripts--but they are l-o-n-g.
Sep 20 '10 #1
1 1891
toolic
70 Expert
The conventional way to include subroutines is to use Perl modules (packages):
Sep 20 '10 #2

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

Similar topics

10
by: Andreas Sheriff | last post by:
Please evaluate the following snippet: int a=5; int b; b = a++ + a; Edit1->Text = b; a = 5; b = a++ + ++a; Edit2->Text = b;
5
by: reezaali | last post by:
Hi All I keep getting back VINET and not Lilas...can someone point me in the right direction? Thanks a lot DECLARE @idoc int DECLARE @doc varchar(1000)
2
by: sparks | last post by:
ok I was trying to do something real simple I thought Me.Clinic.DefaultValue = Me.Clinic.Value I got error either ! or . misused or not found...something like that I thought ok how can you not...
21
by: MLH | last post by:
A97 procedure to open http://www.arch.com/message/ enter an 800 number, press "Continue", enter a text msg string from a memo field and press "Send" This is a calendaring and appointment A97...
2
by: Alpha | last post by:
Hi, Where is a good place on the internet for me to learn about how to use the datagrid. My grid's datasource is a dataset with one table from a DB. I need to know how to perform Edit, Delete and...
4
by: Jan | last post by:
This is my problem: When i have more than 3 lines of text in de tempArray. Iget the following message: An unhandled exception of type 'System.NullReferenceException' occurred in Allen's...
2
by: Just Me | last post by:
Dim iData As IDataObject = Clipboard.GetDataObject() Dim img As System.Drawing.Bitmap img = img.FromFile(ofd.FileName, True) Clipboard.SetDataObject(img) TextControl1.Paste() img.Dispose() : img...
1
by: Richard Sloan | last post by:
I need to implement this in C, but PERL I do not know and have tried to figure this out without sucess. Can someone take a look at the arabjoin script and the arabjoin.pdf and give me some insight,...
6
by: rlueneberg | last post by:
Can someone tell if Sitemap always require a starting root? Can it have more than one root? I am having a problem trying to hide a root node without hiding its children using a Treeview component....
2
by: ppuniversal | last post by:
Hello, Can someone tell a good Tutorial on Network Programming in C++, except Beej's Guide and Vijay Mukhi's tutorials. I want to make a Client Server application in C++ which will involve...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.