Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-09-2002, 12:45 PM   #1
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
Perl Script include


I have the code below that repeats in every Perl script(totally 22 script). I know that in C/C++ I can include the file. How can I do that in Perl? In other words, I want to make
function or include file and than call in each scipt

# 2 Send it to the socket

use IO::Socket;
$sock = IO::Socket::INET->new( PeerAddr => 'localhost',
PeerPort => '9399',
Proto => 'tcp'
die "Could not create socket: $! \n" unless $sock;

# 3. Get feedback from socket and assign it to $feedback

close ($sock);

# 4. Parse XML information

use XML::Simple;
my $xs1 = XML::Simple->new();
my $info = $xs1->XMLin($feedback);

Old 08-20-2002, 09:55 AM   #2
LQ Newbie
Registered: Aug 2002
Posts: 1

Rep: Reputation: 0
require "";


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
include a file in perl script Ateo Programming 1 04-22-2005 09:53 PM
php include()/require() script question atom Programming 11 08-19-2004 01:12 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
need perl fuction like c #include statement for header file mrtwice Programming 5 06-19-2003 02:42 PM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration