Ubuntu :: Apostrophe In Perl Script?

May 6, 2011

Obviously I want search every .doc file in the current directory, look for the phrase MY COMPANY and replace it with Tonys Restaurant, but I�d rather it be Tony�s (with an apostrophe). perl does not seem to like that. Is there anyway to overcome that? Or should I be going about this a different way? I apologize, but all the Google results were either way over my head and more than I need to accomplish, or they seem to suggest that I can escape the apostrophe, as I�ve done with the spaces, but this does not work.

View 2 Replies


ADVERTISEMENT

Programming :: Grep Searching For Strings With (apostrophe)

Nov 10, 2010

I am trying a search for a pattern in the file. I can have any character in the pattern. I am pretty sure I will have $, ", ', ^, ` etc., The Problem I am facing is if I use "" (double quotes) to enclose the pattern, it gives special meaning to $, ^ and " within the string. I have no control over the pattern input. I am getting it from some other file. On the other hand, If I use '' (single quotes) to enclose the pattern, it gives special meaning to the ' (apostrophe) within the string and terminates the pattern prematurely. How do I disable the special meaning these characters have? For example, in perl, I could enclose the pattern within Q and E. Is there an equivalent in grep pattern expression? I could find one in the man page of grep. Is there a solution to this problem?

View 5 Replies View Related

Ubuntu :: Switch Back To /usr/bin/perl After Installing Second Perl?

Aug 14, 2010

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.

View 7 Replies View Related

CentOS 5 Server :: Move 5.5 To /usr/bin/perl So Root Based On Perl 5.12.1?

Aug 11, 2010

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?

View 7 Replies View Related

Debian :: Launch The Perl Config \ Seems To Be That It Does Not Regonize Perl?

Jul 7, 2010

I am trying to launch the perl config, but when I do so I can an weird error.It seems to be that it does not regonize perl ?

conf.pl: line 11: =: command not found
conf.pl: line 19: my: command not found
conf.pl: line 20: syntax error near unexpected token `{'

[code]...

View 2 Replies View Related

OpenSUSE :: Difference Between Perl And Perl-devel?

Jun 28, 2010

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.

[Code]...

View 5 Replies View Related

Fedora Networking :: /usr/bin/perl: Symbol Lookup Error: /usr/bin/perl: Undefined Symbol: PL_use_safe_putenv

Apr 8, 2009

I am trying to setup the wlan access for my Fedora 9 system. I installed ndiswrapper. But when I run

Code:

ndiswrapper -l

i am getting the error

Code:

/usr/bin/perl: symbol lookup error: /usr/bin/perl: undefined symbol: PL_use_safe_putenv

View 11 Replies View Related

CentOS 5 Server :: Unable To Give "Perl Path" To Run Perl CGI Script

Jun 2, 2011

I am unable to run perl-cgi script in my cent os Apache server. I have used locate perl command in terminal window and it gives following result:

[code]....

tell which is the path to perl for example "usr/bin perl"

View 13 Replies View Related

General :: Use "#!/usr/bin/perl" In The Beginning Of A Perl Script

Dec 17, 2010

I have a small problem with Perl and Apache.

If I use "#!/usr/bin/perl" in the beginning of a perl script the script won't work if the script is at all complicated. Simple scripts like "Hello World" works.

But if I use "#!/usr/bin/perl -w" in the beginning all scripts work?

If I don't use the -w this is whats in the logs:

(2)No such file or directory: exec of '/home/test.net/html/cgi-bin/uh/meny.pl' failed

Premature end of script headers: meny.pl

When I use the -w in the script the error-log shows me this.

meny.pl: Name "main::http_path_cgi" used only once: possible typo at /home/test.net/html/cgi-bin/uh/meny.pl line 24.

View 1 Replies View Related

Ubuntu :: How To Use Perl Module?

Jul 3, 2011

How do I use a perl module? Am I suppose to call it from the terminal?

View 2 Replies View Related

General :: Ubuntu 10.04 - How To Use Perl Doc

Oct 5, 2010

I Installed perl-doc in ubuntu 10.04 using sudo apt-get install perl-doc,in the same way I installed doc for postgreSQL. How to use perl-doc so that I can get from perl-doc.

View 2 Replies View Related

Ubuntu :: Execute Perl On Server?

Jan 7, 2010

what is wrong i have a web server setup and working fine running a web store in php i have added a search engine for the web the easiest setup programme is with an extension .pl when i try and execute this it asks me if i want to download it or open it i had this problem with the php script which a reboot sorted out so i have tried rebooting but get the same problem does anybody know how i can get it to execute on my server?

View 2 Replies View Related

Ubuntu Servers :: Perl .pl, Cgi-bin Apache2 Configuration On 9.10?

Jan 18, 2010

Very new to Ubuntu (linux) in general and read various forum and threads to get .pl file to run on a new Ubuntu 9.10.My cgi-bin is in /var/www/site/cgi-bin. The server will run 2 websites site1 and site 2. Site2 is html only and site1 has some cgi and pl files. Everytime i get to the cgi-bin/other_director the browser tries download the file or even if going directly to index.pl. Please find attached my site-available for both default and site1 for your consideration. I also ran a2ensite site1 and a2ensite site2, the reloaded the apache2 serverQuote:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www

[code]....

View 2 Replies View Related

Ubuntu :: Perl Global $_ For AFTER Matched String

Feb 13, 2010

In Perl. I can't find the global variable for $_ (except not $_ it's the one to specify AFTER the matched string.) its dollar sign then something else. Does anyone have a cheat sheet for global symbols?

View 1 Replies View Related

Ubuntu :: Run Perl File From Command Line?

Jul 24, 2010

I'm trying to run a perl script found at http://wiki.scribus.net/index.php/Web_optimised_PDF.

running "compress-newsletter.pl input.pdf" produces the result:

-bash: compress-newsletter.pl: command not found

View 4 Replies View Related

Ubuntu :: Access Postgres Through A PERL Program?

Jul 25, 2010

I am very much interested in Postgres db.
I have installed the DBI and DBD drivers.
Created the Tables.
Can any one help me ..how to access POSTGRES through a PERL program.

View 1 Replies View Related

Ubuntu :: Perl Error Running Findimagedupes

Oct 31, 2010

I'm using Ubuntu 10.10, and I just installed findimagedupes (plus dependencies) from the repositories. I get the same error message no matter how I invoke it:

Code:
$ findimagedupes -R -- images/
Can't locate findimagedupes/C.pm in @INC (@INC contains: /usr/lib/findimagedupes/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/bin/findimagedupes line 41.

[Code]...

View 6 Replies View Related

Ubuntu :: Bad Interpreter: Can't Find Perl In Synaptic Either

Oct 31, 2010

I downloaded a Perl script from off a page on the Internet, and tried to run it. It displayed its source in the web browser. First of all, I am in the cg-bin containing my cgi file and the file permissions are set to 755. I open the Terminal in this folder and run ls, which lists my file called hello.cgi; I run hello.cgi, and get a not found error, and run ./hello.cgi and get source code less comments:

Code:

me@fast:~/Files/Website/perl-dropdown/cgi-bin$ ls
hello.cgi redir.cgi
me@fast:~/Files/Website/perl-dropdown/cgi-bin$ hello.cgi

[code]....

Next I open my Synaptic and search for perl, so I can reinstall it. I find nothing. I navigate to /usr/bin and eventually find perl and perl5.xx as well.

View 4 Replies View Related

Ubuntu :: Perl Tkx Causing Segmentation Fault?

Dec 29, 2010

Running a clean install of Ubuntu 10.10 under VMWare Player on a Thinkpad with Win7. Have previously used Perl/TK for GUI apps to run under both Windows & Linux. Latest Activestate Perl (Windows) does not support Perl/Tk, recommends Tkx, so I wanted to see if Tkx would work under Ubuntu. Tried to install Tkx using cpan, got obscure failure indicating dependency problem. Found a recommendation to apt-get install tcl8.5-dev, and then cpan installed Tkx.

Note, perl 5.10.1 is installed in Maverick by default. apt-get upgrade says I have the latest perl, Tcl and TK. I installed Tkx version 1.09 (using cpan). Couldn't find any info on what perl / Tkx versions are compatible. Now Tkx is installed, but any attempt to run a script that uses Tkx causes a segmentation fault. apt-get installed pmtools to investigate. Even examining Tkx with pmtools can cause a seg fault, for example:

$ pmvers Tkx
Segmentation fault

Is Tkx known to work (or not work) under Ubuntu,version 10.10 or other versions? Any suggestions about what to try next?It's hard to find info about Perl Tkx because so many people put "Can u help, tkx in advance" or similar in postings about anything under the sun. I've read a lot of them.

View 1 Replies View Related

Ubuntu :: Execute System Command With Perl?

Jun 13, 2011

i want to execute system command with perlm but it gives me error.

command is wmic client. here it is

#!/usr/bin/perl
open (EP, "/home/user/Templates/domainpc.log");
while (<EP>) {
chomp;

[Code]....

View 1 Replies View Related

Ubuntu :: Enable Perl Script In UserDir?

Apr 25, 2011

How to enable perl script to be run from user directories in Apache2?

My userdir.conf is as follows code...

At present a perl script file will work perfectly if it is in the /cgi-bin/ directory. However, I would like to be able to work on the system as a normal user and perform programming.

When trying to execute a perl script from my public_html director the log reads code...

View 5 Replies View Related

Fedora :: How To Use Perl On 11

Nov 4, 2009

I am using Fedora 11 and am interested in starting to use perl. Does Fedora 11 come with perl? If so, how do I invoke it? If not, what is the usual (popular) way of installing and running perl on Fedora 11?

View 2 Replies View Related

CentOS 5 :: Looking For Perl-XML-RSS?

Dec 14, 2009

To install BackupPC I need :

XML::RSS - allows the web interface to use RSS. Nice if you want backup notifications via RSS.

But I cannot find this perl-module in the repo's via yum.

Quote:No package perl-XML-RSS available.

View 7 Replies View Related

Ubuntu Servers :: Make Execute PHP And Perl Scripts?

Jan 1, 2010

How would I make my server execute PHP and Perl scripts? (I'm going to be working with both)

I have PHP5 and the latest Perl installed, and my installation is fresh.

Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
code....

View 1 Replies View Related

Ubuntu :: Tcl,tk,perl-tk Fail To Install But Apt-get Reports Success?

Feb 26, 2010

I tried to install perl-tk today, and tried tcl and tk in the process. "apt-get install" is reporting success, but I can't find the commands. I expect them to be in /usr/bin, but they're not there. I've tried "clean" and "update" as well, and even rebooted, to no avail. Synaptic package manager gives the same results. This is happening on two different systems, one running koala and the other intrepid. Here's a snippet of what I've tried:

%heron 35: sudo apt-get purge tk tcl perl-tk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package tk is not installed, so not removed

[Code]...

View 4 Replies View Related

Ubuntu Servers :: Install Libmd5-perl On Server 10.04?

Apr 20, 2010

Trying to install libmd5-perl on Ubuntu server 10.04 beta 2! It says there is no candiate version found for libmd5-perl

View 6 Replies View Related

Ubuntu :: Using Perl Module To Retrieve Data From IPod

Apr 29, 2010

I am trying to make use of the perl module WWW::Nike::NikePlus to retrieve the data from my ipod but apparently I have no idea what I am doing. I installed the package just as the readme said including all the dependencies. I cant really figure out how to run it, i searched for how to use it and found this : Example use that retrieves and prints your last run information

use WWW::Nike::NikePlus;
my $username = 'my@email.address';
my $password = 'MySecretPassword';
my $locale = "en_us";
my $pin = nike_authenticate( $username, $password, $locale );
unless( $pin ) { print "Authentication failed
"; } .....

#Details of the last run
my ($unit, $last_run_dist, $last_run_duration_millisecs,
$last_run_duration_friendly, $last_run_pace_friendly) = nike_last_run();
print "Last run: $last_run_dist$unit in $last_run_duration_friendly
";
print "Last run pace: $last_run_pace_friendly per $unit
";

So I put it in a txt file and saved it with the extension .pl and of course I put in all my info in the username password fields then made it executable with the command sudo chmod +x nikeplus.pl and when I try to run it with either ./ or perl I get this output:

brandon@desktop:~/Apps/nikeplus$ ./nikeplus.pl
./nikeplus.pl: line 1: use: command not found
./nikeplus.pl: line 2: my: command not found
./nikeplus.pl: line 3: my: command not found
./nikeplus.pl: line 4: my: command not found
./nikeplus.pl: line 6: syntax error near unexpected token `('
./nikeplus.pl: line 6: ` my $pin = nike_authenticate( $username, $password, $locale );'
brandon@desktop:~/Apps/nikeplus$ perl nikeplus.pl
Use of uninitialized value $ENV{"TEMP"} in concatenation (.) or string at /usr/local/share/perl/5.10.0/WWW/Nike/NikePlus.pm line 10.
Use of uninitialized value $last_run_duration_millisecs in division (/) at /usr/local/share/perl/5.10.0/WWW/Nike/NikePlus.pm line 106.
Use of uninitialized value $last_run_dist in division (/) at /usr/local/share/perl/5.10.0/WWW/Nike/NikePlus.pm line 107.
Use of uninitialized value $last_run_duration_millisecs in division (/) at /usr/local/share/perl/5.10.0/WWW/Nike/NikePlus.pm line 107.
Illegal division by zero at /usr/local/share/perl/5.10.0/WWW/Nike/NikePlus.pm line 107.
brandon@desktop:~/Apps/nikeplus$

View 2 Replies View Related

Ubuntu Servers :: 10.04 - ERROR: Module Perl Does Not Exist

Jun 14, 2010

I have Apache/2.2.14 (Ubuntu) DAV/2 SVN/1.6.6 mod_fcgid/2.3.4 Phusion_Passenger/2.2.14 PHP/5.2.10-2ubuntu6 with Suhosin-Patch configured In UBUNTU 10.04 I like to install apache2 mod_perl I make apt-get install libapache2-mod-perl2 and I get: Quote: libapache2-mod-perl2 is already the newest version.

Ok I try sudo a2enmod mod_perl ERROR: Module perl does not exist! how I make Perl work in apache2 UBuntu 10.04

View 3 Replies View Related

Ubuntu :: Locating Mail - Perl Script For FetchYahoo?

Jun 18, 2010

New Ubuntu user here switched from Windows to Linux. I finally was able to install a program that allowed me to forward my pop3 to Evolution mail so that I have easy access to my emails. However, once I ran the Perl script for fetchyahoo, it asked me what the path was on the system for my mail spool or mailbox. Where exactly is my spool or mailbox for Evolution so that I can get my Yahoo! mail into the client? I have the free version of Yahoo, so I am trying to use fetchyahoo in the hopes that I can circumvent Yahoo's no-pop policy for free users. Found a mail location that I was able to get Evolution's mail client to look for emails in. Still having nightmares getting fetchyahoo to run properly, however. This is a mildly infuriating process.

View 2 Replies View Related

Ubuntu :: Accessing Parallel Ports From Perl Program

Dec 11, 2010

I am trying to write to the parallel port pins from a Perl program running Ubuntu Linux, to light up led's on a bread board. I've already accomplished this on this same box using a C program, but I cannot get my code below to work. I believe the problem is with the line:
$parport = Device::ParallelPort->new('auto:0');
I've tried different variables between the ('') ticks, but nothing has worked. I use Perl on my web pages for forms, but this has stumped me.

Code is below:
#!/usr/bin/perl require "subparseform.lib"; &Parse_Form; print "Set-cookie:
cart_id=1234; user_id=123;
"; print "Content-type: text/html
"; use strict; use CGI; use Device::ParallelPort;
# use Device::ParallelPort::drv; # use Device::ParallelPort::drv::linux # use Device::ParallelPort::drv::parport
# Set up your parallel port object and tell it what driver to use.
#my $parport = Device::ParallelPort->new('auto:0'); print "It works!!!";

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved