Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.