Perl Script - Sending files on a particular port


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl Script - Sending files on a particular port
# 1  
Old 12-01-2005
Perl Script - Sending files on a particular port

I've written some basic programs in Perl, but unwaware abut socket programming in Perl.

I need to write a file called syslog, onto port 514 of another host from port 514 of my machine. Is this possible in Perl? Which modules are to be used?

Regards,
Rahul.
# 2  
Old 12-01-2005
Of course yes. To avoid duplicating what you will find from the man pages, I will refer you to there:

http://perldoc.perl.org/perlipc.html...-Communication

If you have programmed Socket in C before, that's highly similar.

An alternative object-oriented API is available through some core modules shipped with Perl, i.e. IO::Socket. It's mostly a wrapper of the core socket procedural API, for those wishing to go a more OO way. Both are introduced in the page quoted above.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script, find the next closed (not in use) port from some port range.

hi, i would like to create a bash script that check which port in my Linux server are closed (not in use) from a specific range, port range (3000-3010). the print output need to be only 1 port, and it will be nice if the output will be saved as a variable or in same file. my code is: ... (2 Replies)
Discussion started by: yossi
2 Replies

2. Shell Programming and Scripting

Using Shell Script in place of Perl script to Unzip the zip files.

Hi Expert, We have some shell scripts which Internally uses Perl Script to Unzip the source zip files which comes to inbound directory. So now our requirement is to avoid the dependency on Perl Script and us Shell Script to unzip the files. I have the Perl script with me attached can some one... (3 Replies)
Discussion started by: naveen.dasu
3 Replies

3. Red Hat

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (1 Reply)
Discussion started by: prabakar4all
1 Replies

4. IP Networking

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (0 Replies)
Discussion started by: prabakar4all
0 Replies

5. Shell Programming and Scripting

perl script to check if empty files are created and delete them and run a shell script

I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies

6. Shell Programming and Scripting

perl script for listing files and mailing the all files

Hi, I am new to perl: I need to write perl script to list all the files present in directory and mail should be come to my inbox with all the files present in that directory. advanced thanks for valuable inputs. Thanks Prakash GR (1 Reply)
Discussion started by: prakash.gr
1 Replies

7. Fedora

Sending a byte to the parallel port

Greetings, A sort of newbie question... I would like to control a couple of stepper motors via the parallel port using C code. I have discovered in Linux, the ioperm() function is required before the outportb() function can be used to send a byte to the parallel port. My problem is ioperm()... (1 Reply)
Discussion started by: meyerga00
1 Replies

8. Shell Programming and Scripting

script to monitor files in a directory and sending the alert

Hi All, We are having important config files in an directory which was accessable by all /auto/config/Testbed/>ls config1.intial config2.intial config3.inital often we find that some of the lines are missing in config files, we doubt if some one is removing. I would like to write... (0 Replies)
Discussion started by: shellscripter
0 Replies

9. UNIX for Dummies Questions & Answers

Sending hex to a port

I am trying to send hex strings down a port but the server treats the strings as ascii. When I telnet to a port, is there a way in which I can specify that the string being sent is in hexadecimal format. I know thiis can be done quite easily in C, but can it be done using standard unix commands... (3 Replies)
Discussion started by: LLL
3 Replies

10. Shell Programming and Scripting

Perl Script Listening On A TCP Port

Hi, Im programming a perl script which will act as a daemon listening on a tcp port (2323) and will take (<stdin>) from the client (im going to use telnet) and run the arguments from (<stdin>) against an program already on the server, which is used to list books in the library at uni. So far... (1 Reply)
Discussion started by: emcb
1 Replies
Login or Register to Ask a Question