LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux Interpreter (https://www.linuxquestions.org/questions/linux-general-1/linux-interpreter-451655/)

jazman 06-04-2006 11:14 PM

Linux Interpreter
 
Hi there

I have a windows machine here with perl installed.
My script runs beatifully.

Its uses ftp and copy functions which it grabs form c:\perl\lib\ftp and file respectively.

The linux machine I need them to run on has none of this. I am unable to modify this perl version. I run my script and it dies trying to find these functions. Can I and where would I copy these .pm files on the linux machine so that when my script executes it would recognise them?

Cheers

mimithebrain 06-04-2006 11:18 PM

try installing the perl ftp packages available for your distro.

Debian:
use synaptic

Mandriva:
use the GUI or rpm.pbone.net

jazman 06-04-2006 11:28 PM

hmmm
 
Well Im not too sure what its using...

Its a commview linux firewall thing... ANd me knowing 0 about linux I have no idea what mandriva is?

cs-cam 06-05-2006 12:18 AM

The .pm files should go in /usr/lib/perl5/site_perl/current/. Obviously from there they need their directory structure, eg. IO/Zlib.pm but you get thhe drift.

Electro 06-05-2006 12:40 AM

It is easier to use perl's command prompt to install the modules that your script needs than using the package programs or copying the .pm file to the correct location. This is very, very easy than you think. ACtually it is easier than the rpm or deb installer.

As root type `perl -MCPAN -e shell`. Then type `install [module name]`. After you are done installing all the modules, type exit. Do not forget to set the #! path so bash can find the right interpreter. bash will assume it is either bash or sh. Usually the path to perl is "/usr/bin/perl". Some modules may need to be compiled, so you may want to install the gcc compiler and many other headers although you have to use package installer which can be pain in the ass to install rpm files.

cs-cam 06-05-2006 01:24 AM

Actually yeah, what Electro said :D

Not a Perl person so I'm always forgetting CPAN even exists but it's off the charts easy to use :)

pixellany 06-05-2006 07:46 AM

Quote:

Originally Posted by jazman
Its a commview linux firewall thing...

What does this mean?

mimithebrain 06-05-2006 10:27 AM

The package to install for Ubuntu and debian based distributions is libnet-perl.
It must be pretty close for all other distros...

jazman, what distro do you use?


All times are GMT -5. The time now is 04:10 AM.