Questions tagged [perl]

A widely used cross platform scripting language that is installed in OSX.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Catalina - perl not working with apache2; apache2 working with php and perl running from the Terminal

I cannot get perl cgi scripts running on my apache2. Safari displays the text of the script, instead of the intended output. Apache is running, and can run php scripts. Perl programs run from the ...
0
votes
1answer
39 views

Running perl shell script from AppleScript on Mojave

I have a simple AppleScript that calls a perl shell script to replace a string with another string (here one with two) in files with specified file extensions (here .txt and .xyz). It used to work ...
0
votes
0answers
226 views

CPAN module on macOS: Warning: Cannot install xxx, don't know what it is

I am trying to install a Perl module. > cpan rajce-get Reading '/Users/Ivanov/.cpan/Metadata' Database was generated on Fri, 04 Oct 2019 23:17:03 ...
0
votes
1answer
484 views

How do I restore default perl in macOS Mojave?

Is there a way to restore default perl5 and cpan modules in Mojave without rebuilding the OS?
0
votes
0answers
33 views

How can I stop the system changing name extensions of my files?

I have a created an executable Perl script, starting with #!/usr/bin/perl and have called it t. So when I launch ./t on the Terminal the script is executed and everything is fine. But apparently ...
2
votes
1answer
190 views

Perl library locations, and System Integrity Protection

My system perl seems to have a bunch of cruft left over from previous installations: % which perl /usr/bin/perl % perl -V | perl -ne 'print if /INC/...//' @INC: /Library/Perl/5.18/darwin-...
2
votes
0answers
508 views

Is there a Terminal command to verify macOS screensharing?

Is there a terminal command to determine if a screensharing session from a remote machine is not just initiated but also actively being viewed? Details: I have a background (Perl) process running on ...
0
votes
1answer
597 views

SH script calls Perl script. Works when I double click, but Perl script fails when I call from terminal

Severe newb here. I have a shell script that simply calls a perl script to create a file. It works if I double-click the SH file, but fails if I call the file in a terminal. here is the entire SH ...
1
vote
2answers
3k views

Perl RegEx in Mac terminal: grep -p “^([^\t]*\t){2}mypattern\t” textfile.txt doesn't work

I am a beginner of using programming commands. Why {2} is not functional after ([^\t]*\t) in macOS terminal? Is there any website providing Perl RegEx which works in mac? Thanks!
0
votes
1answer
183 views

Proper shebang line for running perl script with an AppleScript on a perlbrew install?

I have the following simple AppleScript which calls a perl script I wrote to clean the desktop: do shell script "/Users/stevied/bin/clean_desktop.pl" The script works fine when run from the command ...
0
votes
1answer
37 views

Did I just mess up system Perl?

I am currently setting up a backup script on a macOS Sierra machine. In the logs some warnings related to the tool appeared, so I looked them up. Seems like this is caused by a missing Lchown Perl ...
2
votes
3answers
2k views

Crypt-SSLeay on a macbook

I'm trying to install Crypt-SSLeay on a macbook and it failed. I manually downloaded Crypt-SSLeay from cpan and issued: perl Makefile.pl The error is openssl-version.c:2:10: fatal error: 'openssl/...
1
vote
2answers
593 views

How to pass an AppleScript variable to Perl script?

I have a Perl script that does some text transformation on a given file. Now I would like to call this script from an AppleScript which in turn I could execute from the script menu in order to run ...
2
votes
1answer
394 views

How to install Monkeysphere on OSX El Capitan

I tried to install Monkeysphere via Homebrew but it complains of an unmet dependency. monkeysphere: Unsatisfied dependency: Crypt::OpenSSL::Bignum Homebrew does not provide Perl dependencies; install ...
0
votes
1answer
69 views

How to control where script run by cron saves files?

I've got the following cron job that runs at 6 am every morning: 00 6 * * * /Users/username/path/to/script/wget.pl 1; The script, written in perl, fetches the latest files from a website. Within ...
0
votes
1answer
1k views

Running mod_perl on El capitan

I'm trying to run mod_perl on El capitan. Process Following http://blog.n42designs.com/blog/2014/10/23/compiling-mod-perl-for-apache-2-dot-4-on-os-x-10-dot-10-yosemite/ an https://stackoverflow.com/...
0
votes
1answer
709 views

Is El Capitan preventing me from getting the Perl module DBD::Oracle working?

Let me start by saying I'm not traditionally a Mac user. I'm still trying to transition from Gentoo, where compiling everything from source was the default state, and the system wasn't actively ...
5
votes
1answer
1k views

El Capitan SIP and CPAN

As we know, Apple introduced it's new "rootless" feature in El Capitan that greatly restricts what the root user is capable of doing. Unfortunately this feature breaks CPAN for Perl users. One can ...
1
vote
1answer
1k views

openpgp2ssh (monkeysphere tool) installed with Homebrew on OS X error Can't locate Crypt/OpenSSL/Bignum.pm in @INC

I am trying to install monkeysphere on an OS X machine with Homebrew: $ brew install monkeysphere monkeysphere: Unsatisfied dependency: Crypt::OpenSSL::Bignum Homebrew does not provide Perl ...
0
votes
1answer
956 views

Trying to Install WWW:Mechanize and Getting Localhost Error

Okay . . . I've been trying to install WWW::Mechanize through CPAN and it always chokes at this line: t/local/back.t ........... 1/47 Error GETing http://localhost:60603/: Can't connect to localhost:...
0
votes
1answer
180 views

Changing ownership of .cpan

I'm getting back into Perl; several months ago I had to have a new hard drive installed and so had to start over again. When I try to update CPAN, I get this message: Your configuration suggests that ...
1
vote
1answer
145 views

To exclude bak files in Finder's search?

I create bak files after every Perl operation. How can you exclude all bak files in your Finder's search?
3
votes
1answer
908 views

Problem installing Devel::REPL using cpanm

I tried following the instructions for installing CPAN modules at this link: http://www.cpan.org/modules/INSTALL.html However, when I try to install Devel::REPL, it fails. Here is the log: [user@...
1
vote
1answer
202 views

What is wrong in this Perl regex in OSX?

The code works in Ubuntu, but not in OSX. I run perl -000pe 's/\n/\n\\begin{enumerate}\n/; s/\n\d./\n\\item /g; s/$/\\end{enumerate}\n/' lorem.tex I get -bash: $: command not found MacBook-Air:...
4
votes
1answer
673 views

Find and replace with grep and perl

I'd like to grep and replace specific text in textfiles within a directory and all subdirs. I try the following: ls -R | egrep '.*\.txt' | perl -i -p -e 's/one.a/two.a/g' Although grep spits out a ...
1
vote
1answer
68 views

Invoke Perl script in Windows from OS X

I have a Perl script written in Windows and an AppleScript written in OS X. I want the AppleScript to invoke the Perl script that is residing in Windows. How can I do this?
2
votes
2answers
3k views

automator to run AppleScript for a shell script

For a selected file in Finder, I like to run a perl script using Services. I created an Automator process that runs an AppleScript: on run {input, parameters} tell application "Terminal" ...
1
vote
1answer
521 views

Does Apache require special settings to run a command?

I am trying to create an image using Bio::Perl/Bio::Graphics and implement it on my webserver. However, whenever I am trying to run my scripts online, the command line does not respond to run my ...
0
votes
1answer
3k views

How to install modules from CPAN without sudo?

Is there a way to install modules from CPAN without resorting to sudo? (And without perlbrew, please.)
2
votes
1answer
124 views

How to implement this script on a Mac

I just read Matt Might's blog post on eliminating filler and "weasels" from my writing, and I am wondering how I would implement this on Latex to run and check my document? I know I should use ...
1
vote
2answers
874 views

MacOSX 10.8 and 32-bit perl modules

I just upgraded from MacOSX 10.6 to 10.8. Many of my projects depend on Mac::Glue, Mac::Carbon and their ilk. Even though Mac::Glue comes bundled with MacOSX 10.8 perl, it doesn't seem to work: [kw|...
0
votes
2answers
762 views

Using gwhois on OSX

How does one install gwhois on a Mac? I'm already up and running with Homebrew; I assume that there's some magic perl configuration required before it will run. I've tried the following: brew ...
16
votes
2answers
22k views

How to install CPAN modules from the command line on OS X?

Simple question: How to install CPAN modules on OS-X like normal Linux/Unix way? I just want to type in cpan something like install Perl6::Say for example.
8
votes
2answers
10k views

How to reinstall Mac OS X built in Perl on Mountain Lion?

I updated to Mountain Lion 4 days ago and then realised that my perl scripts did not work any longer. So I installed ActivePerl 5.14 (newest version) because I thought that perl has been deleted. ...
3
votes
3answers
6k views

Getting Perl DBD::mysql working on OS X 10.7?

I can't seem to get Perl & MySQL to talk to each other on OS X 10.7 Lion. I did all the installs by the book, I used Oracle's PKG installer for the latest MySQL Community Server, and I installed ...
2
votes
1answer
1k views

What is Lion's version of Perl 5?

What version of Perl 5 is OS X Lion shipping with?