I am new here and want to lern CentOS. Current I have installed CentOS 5.5 x64 and Perl 5.8.8. Now i have install Perl 5.12.1 which located to /usr/local/bin/perl. But how I can move it to /usr/bin/perl so root based on Perl 5.12.1?
I had a problem recently, where a perl script was consuming server resources. I found out it was a perl script by using "top". But it didn't give the path to the script. Nor did ps.Also, ps -ef showed that the process with that pid is /usr/bin/httpd (apache), so it must have been apache serving some perl page I suppose.Is it possible to get the path to currently running perl script, if I only know the process PID of the perl process that is running that script? If so, how? I don't need the path to the perl binary, I need the path to the perl script that binary is currently executing.
I'm the server guy which is why I don't know this, but were staging a new webserver and we use some custom perl scripts and as were moving the site over for testing, apache is blowing a perl error;Can't locate web.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/mcp/htdocs/cgi-bin/newgraph.gif line 11.,Now I can copy that file local, but there are a bunch of things, so the question is how do you globally add a folder to the perl search path
I recently reinstalled the B module for perl. Now I found out it didn't just do that, it installed a whole new copy of perl into /usr/local/bin/perl. When I type 'which perl' at the terminal, it says '/usr/local/bin/perl' instead of '/usr/bin/perl'. Normally, this wouldn't bother me. But I installed the one in local/bin without threading support. The one that comes with the system already is build with threading support, which is why I want to switch back to the system perl, and possibly remove the one in /usr/local/bin.
So how do I change it so that the result of 'which perl' returns as '/usr/bin/perl'? And what do I have to do to remove /usr/local/bin/perl?
The reason I need threading support is because I'm designing a file copier that copies several chunks of a file simultaneously to speed up the copying process. Guaranteed a useful script if it works.
I've been running SQL-Ledger on Centos 5.5 (x86_64) for some time. At some point in time I must have done something to either perl or CPAN and I now get the following error in SQL-Ledger. Not an ARRAY reference at SL/Form.pm line 1047. Attempt to free unreferenced scalar: SV 0x18034630, Perl interpreter: 0x17363010 during global destruction. Attempt to free unreferenced scalar: SV 0x18034630, Perl interpreter: 0x17363010 during global destruction
my $file = 'test/mybigfile'; my $zip = Archive::Zip->new(); my $zipped = $zip->addFile($file);
it simply takes a file (in this case, "mybigfile") and creates a ZIP file containing that file only. Now, my problem is that when I go to decompress the ZIP file, it creates the relative (or absolute, depending on case) path of the original file. To make an example:
$ pwd /tmp/perl $ ls -R
What I need is *not* to store the path information inside of the ZIP file, so that once I decompress the ZIP file I only get the original one without having paths created.
I'm new in perl programming and linux OS. What is the difference between perl and perl-devel? What does mean devel? Iwant to install Catalyst and before install as required I have to check if make, gcc and perl-devel are installed in my system. make and gcc are installed. But I have to install perl-devel. First I searched for make, gcc and perl-devel in YAST Software Management and search did not find perl-devel. I visited the software.opensuse.org and wrote "perl-devel" and searched. The result was many similar zips with a prefix perl-devel and I can not choose one for needed perl-devel.
I'm writing a perl script to remove a test database and part of that is of course getting rid of all files. So I wrote this to do the job:
This always results in an "Could not open /u00/app/oracle/product/10.2.0/rdbms/dbs for reading: No such file or directory" (that directory is the one ending with the $spfile_dir variable) message, although that directory exists and the executing user has writing rights on it.
The same behaviour if I create the directory array like this:
The problem does not occur when one of the directories is the only element in the array though. Of course I could copy and paste that part of the script for the second directory, but I don't like that workaround.
I've been reading / trying to learn some Perl lately. I've found the free book, "Learning Perl", quite good and easy to follow most of the times. However, today I was testing one of the scripts in the book and it would only run partly.
#!/usr/bin/perl use warnings; use strict; my %inventory;
This row is supposed to give option, either to use an additional script as pipe (sort.plx),or STDOUT if the extra script is not found.It works with the other script present, however, with the sort.plx being absent it simply wont use STDOUT instead but whines to me:
Can't open perl script "sort.plx": No such file or directory
Has the author of the original script done some error writing it? Since I'm a beginner and found most of the stuff confusing in Perl either way (having previously only experience in Bash and some in PHP) - I can't really tell for sure , but from what I can read in documentation - it doesn't appear to be wrong.As it looks now, the only way for me to use STDOUT is only by removing:
open (SORT, "| perl sort.plx") or *SORT = *STDOUT; select *SORT;
rows. But then, I lose the piping in to that other script as an option.
I'm having some perl problems while using yum update... I recently upgraded to 5.3 and have the latest MailScanner.. I do not want to have to remove perl because it will remove a bunch of other things along with it.
I'm trying to split a text file into various parts. Everything in between "123" and "break" (including linebreaks) goes into the splitted file.
e.g. using this text file:
This should split into 4 files. However I'm only getting 2 files: one for the line "123break" and one for "123 blah break". The two occurrences that contain linebreaks are being ignored. The .* part of my match should capture linebreaks seeing that I'm using the /s modifier shouldn't it? Even when I use the match /(123 break)/gs it still doesn't capture the first occurrence. I'm using Perl v5.12.3 (from ActiveState) on Windows XP. The text file is also in Windows format.
Code listed below.
The above code generates two files Output_1.txt and Output_2.txt which contain "123break" and "123 blah break" respectively. I want it to generate four files.
I have a permission to use several CentOS5 computers that are connected to a server where all shared programs sit. Accordingly, all Perl users for example have an identical path to Perl (e.g. /export/user/bin). The administrator suggested I'll install all the programs I need (specifically Perl and Mysql) in my personal space, and then add them to the path before the already installed ones. Accordingly, I could add/change modules without "sudo" privileges, and without changing the global setting.
I am trying to install koha on centos 5.5. The manual tells me to install perl dependencies from companion CD. copy the usr_local.tar.gz to hard drive. But there are seven cd for centos. Which one is the right one for perl dependencies?
CentOS and RHEL even though I've been using various Debian/Ubuntu Distros for quite some time. However, I always used to install perl modules via apt-get or, if that did not work, via cpan.In CentOS, I tried installing a couple of perl modules via yum but there are only a very few available. When trying to install perl modules via cpan, the install process usually fails during the make process.I'd prefer to install those modules via the distribution's package manger yum as it's easier to resolve dependencies. Are there any repositories I should add to have more perl packages available? (Where to add further repositories, I just know /etc/apt/sources.list in debian based distros)The other option still would be to install perl modules via cpan. For instance, when trying to cpan install Geo::IP, the output is as follows:
CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Wed, 02 Mar 2011 02:42:03 GMT
I have newly updated CentOS 5.6 server and would like to keep it "true" to CentOS, so try to avoid manually installing rpm's and CPAN modules. I need to install perl graphing modules, Chart::Base, GD, GD::Graph, GD::Text, etc. Have already done Yum install gd gd-devel php-gd
Setting up Install Process Resolving Dependencies ---> Running transaction check ---> Package perl.i386 4:5.8.8-18.el5_3.1 set to be updated ---> Package perl.x86_64 4:5.8.8-27.el5 set to be updated .....